Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/crystal
File: index.html
<!doctype html>
[0] Fix | Delete
[1] Fix | Delete
<title>CodeMirror: Crystal mode</title>
[2] Fix | Delete
<meta charset="utf-8"/>
[3] Fix | Delete
<link rel=stylesheet href="../../doc/docs.css">
[4] Fix | Delete
[5] Fix | Delete
<link rel="stylesheet" href="../../lib/codemirror.css">
[6] Fix | Delete
<script src="../../lib/codemirror.js"></script>
[7] Fix | Delete
<script src="../../addon/edit/matchbrackets.js"></script>
[8] Fix | Delete
<script src="crystal.js"></script>
[9] Fix | Delete
<style>
[10] Fix | Delete
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
[11] Fix | Delete
.cm-s-default span.cm-arrow { color: red; }
[12] Fix | Delete
</style>
[13] Fix | Delete
[14] Fix | Delete
<div id=nav>
[15] Fix | Delete
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
[16] Fix | Delete
[17] Fix | Delete
<ul>
[18] Fix | Delete
<li><a href="../../index.html">Home</a>
[19] Fix | Delete
<li><a href="../../doc/manual.html">Manual</a>
[20] Fix | Delete
<li><a href="https://github.com/codemirror/codemirror">Code</a>
[21] Fix | Delete
</ul>
[22] Fix | Delete
<ul>
[23] Fix | Delete
<li><a href="../index.html">Language modes</a>
[24] Fix | Delete
<li><a class=active href="#">Crystal</a>
[25] Fix | Delete
</ul>
[26] Fix | Delete
</div>
[27] Fix | Delete
[28] Fix | Delete
<article>
[29] Fix | Delete
<h2>Crystal mode</h2>
[30] Fix | Delete
<form><textarea id="code" name="code">
[31] Fix | Delete
# Features of Crystal
[32] Fix | Delete
# - Ruby-inspired syntax.
[33] Fix | Delete
# - Statically type-checked but without having to specify the type of variables or method arguments.
[34] Fix | Delete
# - Be able to call C code by writing bindings to it in Crystal.
[35] Fix | Delete
# - Have compile-time evaluation and generation of code, to avoid boilerplate code.
[36] Fix | Delete
# - Compile to efficient native code.
[37] Fix | Delete
[38] Fix | Delete
# A very basic HTTP server
[39] Fix | Delete
require "http/server"
[40] Fix | Delete
[41] Fix | Delete
server = HTTP::Server.new(8080) do |request|
[42] Fix | Delete
HTTP::Response.ok "text/plain", "Hello world, got #{request.path}!"
[43] Fix | Delete
end
[44] Fix | Delete
[45] Fix | Delete
puts "Listening on http://0.0.0.0:8080"
[46] Fix | Delete
server.listen
[47] Fix | Delete
[48] Fix | Delete
module Foo
[49] Fix | Delete
def initialize(@foo); end
[50] Fix | Delete
[51] Fix | Delete
abstract def abstract_method : String
[52] Fix | Delete
[53] Fix | Delete
@[AlwaysInline]
[54] Fix | Delete
def with_foofoo
[55] Fix | Delete
with Foo.new(self) yield
[56] Fix | Delete
end
[57] Fix | Delete
[58] Fix | Delete
struct Foo
[59] Fix | Delete
def initialize(@foo); end
[60] Fix | Delete
[61] Fix | Delete
def hello_world
[62] Fix | Delete
@foo.abstract_method
[63] Fix | Delete
end
[64] Fix | Delete
end
[65] Fix | Delete
end
[66] Fix | Delete
[67] Fix | Delete
class Bar
[68] Fix | Delete
include Foo
[69] Fix | Delete
[70] Fix | Delete
@@foobar = 12345
[71] Fix | Delete
[72] Fix | Delete
def initialize(@bar)
[73] Fix | Delete
super(@bar.not_nil! + 100)
[74] Fix | Delete
end
[75] Fix | Delete
[76] Fix | Delete
macro alias_method(name, method)
[77] Fix | Delete
def {{ name }}(*args)
[78] Fix | Delete
{{ method }}(*args)
[79] Fix | Delete
end
[80] Fix | Delete
end
[81] Fix | Delete
[82] Fix | Delete
def a_method
[83] Fix | Delete
"Hello, World"
[84] Fix | Delete
end
[85] Fix | Delete
[86] Fix | Delete
alias_method abstract_method, a_method
[87] Fix | Delete
[88] Fix | Delete
macro def show_instance_vars : Nil
[89] Fix | Delete
{% for var in @type.instance_vars %}
[90] Fix | Delete
puts "@{{ var }} = #{ @{{ var }} }"
[91] Fix | Delete
{% end %}
[92] Fix | Delete
nil
[93] Fix | Delete
end
[94] Fix | Delete
end
[95] Fix | Delete
[96] Fix | Delete
class Baz &lt; Bar; end
[97] Fix | Delete
[98] Fix | Delete
lib LibC
[99] Fix | Delete
fun c_puts = "puts"(str : Char*) : Int
[100] Fix | Delete
end
[101] Fix | Delete
[102] Fix | Delete
$baz = Baz.new(100)
[103] Fix | Delete
$baz.show_instance_vars
[104] Fix | Delete
$baz.with_foofoo do
[105] Fix | Delete
LibC.c_puts hello_world
[106] Fix | Delete
end
[107] Fix | Delete
</textarea></form>
[108] Fix | Delete
<script>
[109] Fix | Delete
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
[110] Fix | Delete
mode: "text/x-crystal",
[111] Fix | Delete
matchBrackets: true,
[112] Fix | Delete
indentUnit: 2
[113] Fix | Delete
});
[114] Fix | Delete
</script>
[115] Fix | Delete
[116] Fix | Delete
<p><strong>MIME types defined:</strong> <code>text/x-crystal</code>.</p>
[117] Fix | Delete
</article>
[118] Fix | Delete
[119] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function