Hash :
bf551967
Author :
Date :
2017-02-08T23:25:12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
<h1>Haxe</h1>
<p>To use this language, use the class "language-haxe".</p>
<h2>Strings and string interpolation</h2>
<pre><code>"Foo
bar $baz"
'Foo
bar'
"${4 + 2}"</code></pre>
<h2>Regular expressions</h2>
<pre><code>~/haxe/i
~/[A-Z0-9._%-]+@[A-Z0-9.-]+.[A-Z][A-Z][A-Z]?/i
~/(dog|fox)/g</code></pre>
<h2>Conditional compilation</h2>
<pre><code>#if !debug
trace("ok");
#elseif (debug_level > 3)
trace(3);
#else
trace("debug level too low");
#end</code></pre>
<h2>Metadata</h2>
<pre><code>@author("Nicolas")
@debug
class MyClass {
@range(1, 8)
var value:Int;
@broken
@:noCompletion
static function method() { }
}</code></pre>
<h2>Reification</h2>
<pre><code>macro static function add(e:Expr) {
return macro $e + $e;
}</code></pre>