Syntax
cs.Syntax (extern class)
Generate C# syntax not directly supported by Haxe. Use only at low-level when specific target-specific code-generation is required.
Static Members
Inject code directly into generated source.
code must be a string constant.
Additional args are supported to provide code interpolation, for example:
Syntax.code("System.Console.WriteLine({0} + {1})", "hi", 42);
will generate
System.Console.WriteLine("hi" + 42);
Emits a compilation error if the count of args does not match the count of placeholders in code.
| Name | Type |
|---|---|
code |
String |
args |
haxe.Rest<Dynamic> |
| Returns |
|---|
| Dynamic |
Inject code directly into generated source.
The same as cs.Syntax.code except this one does not provide code interpolation.
| Name | Type |
|---|---|
code |
String |
| Returns |
|---|
| Dynamic |
Metadata
| Name | Parameters |
|---|---|
:nativeGen |
- |
:noClosure |
- |