Generate JavaScript syntax not directly supported by Haxe. Use only at low-level when specific target-specific code-generation is required.
Static methods
staticcode(code:String, args:Rest<Dynamic>):Dynamic
Inject code
directly into generated source.
code
must be a string constant.
Additional args
are supported to provide code interpolation, for example:
Syntax.code("console.log({0}, {1})", "hi", 42);
will generate
console.log("hi", 42);
staticconstruct<T>(cl:Class<T>, args:Rest<Dynamic>):T
staticconstruct(cl:String, args:Rest<Dynamic>):Dynamic
Generate new cl(...args)
expression.
staticdelete(o:Dynamic, f:String):Bool
staticdelete(o:Dynamic, f:Int):Bool
Generate delete o[f]
expression.