HaxeDoc2
6 trace(rtti); 7 } 8 } 8.5.1 RTTI structure.................................... General type information path:The type path (3.7 ...
Class field information name: The name of the field. type: The type of the field. isPublic:Whether or not the field is public (4 ...
Chapter 9 9 Macros Macros are without a doubt the most advanced feature in Haxe. They are often perceived as dark magic that onl ...
returns an expression. If a macro is called, it effectively inserts code at the place it was called from. In that respect, it co ...
It is important to understand that arguments to macros are not guaranteed to be evaluated, so any intended side-effect is not gu ...
9.2.2 Constant Expressions A macro can be declared to expect constant (5.2) arguments: 1 class Main { 2 static public function m ...
${}and$e{}: Expr -> ExprThis can be used to compose expressions. The expression within the delimiting{}is executed, with its ...
9.3.3 Class Reification It is also possible to use reification to obtain an instance ofhaxe.macro.Expr.TypeDefinition. This is i ...
accordingly. This “trick” was first used in Juraj Kirchheim’stinkerbell^1 library for exactly the same pur- pose. Tinkerbell pro ...
5 } 6 } Thebuildmethod ofTestBuildingMacroperforms three steps: 1.It obtains the build fields usingContext.getBuildFields(). 2.I ...
17 } 18 19 static function makeEnumField(name, kind){ 20 return { 21 name: name, 22 doc: null, 23 meta: [], 24 access: [], 25 ki ...
9 return null; 10 } 11 12 macro static public 13 function fromBaseClass():Array{ 14 trace("fromBaseClass: " 15 + Context.getLoca ...
1 import haxe.macro.Context; 2 import haxe.macro.Expr; 3 4 using Main; 5 using haxe.macro.Tools; 6 7 class Main { 8 static publi ...
24 } 25 } 26 27 class Main { 28 static public function main() { } 29 } With both interfacesI1andI2having:autoBuildmetadata, the ...
Part III III Standard Library ...
Chapter 10 Standard Library Standard library 10.1 String............................................. Type: String A String is a ...
If a write access is made with a positive index which is out of bounds,null(or the default value (2.2) for basic types (2.1) on ...
10.2.2 Vector AVectoris an optimized fixed-lengthcollectionof elements. Much like Array (10.2.1), it has one type parameter (3.2 ...
1 import haxe.ds.GenericStack; 2 3 class GenericStackExample { 4 static public function main() { 5 var myStack = new GenericStac ...
26 // Maps iterate over their valuesby 27 // default 28 var valueSum; 29 for (value in map4){ 30 trace(value); // Monday \nTuesd ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf