Edit File by line
/home/barbar84/www/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/haxe
File: index.html
<!doctype html>
[0] Fix | Delete
[1] Fix | Delete
<title>CodeMirror: Haxe 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="haxe.js"></script>
[8] Fix | Delete
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
[9] Fix | Delete
<div id=nav>
[10] Fix | Delete
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
[11] Fix | Delete
[12] Fix | Delete
<ul>
[13] Fix | Delete
<li><a href="../../index.html">Home</a>
[14] Fix | Delete
<li><a href="../../doc/manual.html">Manual</a>
[15] Fix | Delete
<li><a href="https://github.com/codemirror/codemirror">Code</a>
[16] Fix | Delete
</ul>
[17] Fix | Delete
<ul>
[18] Fix | Delete
<li><a href="../index.html">Language modes</a>
[19] Fix | Delete
<li><a class=active href="#">Haxe</a>
[20] Fix | Delete
</ul>
[21] Fix | Delete
</div>
[22] Fix | Delete
[23] Fix | Delete
<article>
[24] Fix | Delete
<h2>Haxe mode</h2>
[25] Fix | Delete
[26] Fix | Delete
[27] Fix | Delete
<div><p><textarea id="code-haxe" name="code">
[28] Fix | Delete
import one.two.Three;
[29] Fix | Delete
[30] Fix | Delete
@attr("test")
[31] Fix | Delete
class Foo&lt;T&gt; extends Three
[32] Fix | Delete
{
[33] Fix | Delete
public function new()
[34] Fix | Delete
{
[35] Fix | Delete
noFoo = 12;
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
public static inline function doFoo(obj:{k:Int, l:Float}):Int
[39] Fix | Delete
{
[40] Fix | Delete
for(i in 0...10)
[41] Fix | Delete
{
[42] Fix | Delete
obj.k++;
[43] Fix | Delete
trace(i);
[44] Fix | Delete
var var1 = new Array();
[45] Fix | Delete
if(var1.length > 1)
[46] Fix | Delete
throw "Error";
[47] Fix | Delete
}
[48] Fix | Delete
// The following line should not be colored, the variable is scoped out
[49] Fix | Delete
var1;
[50] Fix | Delete
/* Multi line
[51] Fix | Delete
* Comment test
[52] Fix | Delete
*/
[53] Fix | Delete
return obj.k;
[54] Fix | Delete
}
[55] Fix | Delete
private function bar():Void
[56] Fix | Delete
{
[57] Fix | Delete
#if flash
[58] Fix | Delete
var t1:String = "1.21";
[59] Fix | Delete
#end
[60] Fix | Delete
try {
[61] Fix | Delete
doFoo({k:3, l:1.2});
[62] Fix | Delete
}
[63] Fix | Delete
catch (e : String) {
[64] Fix | Delete
trace(e);
[65] Fix | Delete
}
[66] Fix | Delete
var t2:Float = cast(3.2);
[67] Fix | Delete
var t3:haxe.Timer = new haxe.Timer();
[68] Fix | Delete
var t4 = {k:Std.int(t2), l:Std.parseFloat(t1)};
[69] Fix | Delete
var t5 = ~/123+.*$/i;
[70] Fix | Delete
doFoo(t4);
[71] Fix | Delete
untyped t1 = 4;
[72] Fix | Delete
bob = new Foo&lt;Int&gt;
[73] Fix | Delete
}
[74] Fix | Delete
public var okFoo(default, never):Float;
[75] Fix | Delete
var noFoo(getFoo, null):Int;
[76] Fix | Delete
function getFoo():Int {
[77] Fix | Delete
return noFoo;
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
public var three:Int;
[81] Fix | Delete
}
[82] Fix | Delete
enum Color
[83] Fix | Delete
{
[84] Fix | Delete
red;
[85] Fix | Delete
green;
[86] Fix | Delete
blue;
[87] Fix | Delete
grey( v : Int );
[88] Fix | Delete
rgb (r:Int,g:Int,b:Int);
[89] Fix | Delete
}
[90] Fix | Delete
</textarea></p>
[91] Fix | Delete
[92] Fix | Delete
<p>Hxml mode:</p>
[93] Fix | Delete
[94] Fix | Delete
<p><textarea id="code-hxml">
[95] Fix | Delete
-cp test
[96] Fix | Delete
-js path/to/file.js
[97] Fix | Delete
#-remap nme:flash
[98] Fix | Delete
--next
[99] Fix | Delete
-D source-map-content
[100] Fix | Delete
-cmd 'test'
[101] Fix | Delete
-lib lime
[102] Fix | Delete
</textarea></p>
[103] Fix | Delete
</div>
[104] Fix | Delete
[105] Fix | Delete
<script>
[106] Fix | Delete
var editor = CodeMirror.fromTextArea(document.getElementById("code-haxe"), {
[107] Fix | Delete
mode: "haxe",
[108] Fix | Delete
lineNumbers: true,
[109] Fix | Delete
indentUnit: 4,
[110] Fix | Delete
indentWithTabs: true
[111] Fix | Delete
});
[112] Fix | Delete
[113] Fix | Delete
editor = CodeMirror.fromTextArea(document.getElementById("code-hxml"), {
[114] Fix | Delete
mode: "hxml",
[115] Fix | Delete
lineNumbers: true,
[116] Fix | Delete
indentUnit: 4,
[117] Fix | Delete
indentWithTabs: true
[118] Fix | Delete
});
[119] Fix | Delete
</script>
[120] Fix | Delete
[121] Fix | Delete
<p><strong>MIME types defined:</strong> <code>text/x-haxe, text/x-hxml</code>.</p>
[122] Fix | Delete
</article>
[123] Fix | Delete
[124] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function