build macro
Overview of Haxe code snippets, examples and tutorials tagged with build macro.
Mar 26, 2016 Macros / Code completion from URL
This example will load an URL, scrape all id's from the HTML page and use them for auto-completion.‥
Jul 04, 2017 Macros / Include a file next to a Haxe module file
This example lets you take a file next to the current module .hx file and include its file content. That can be very useful if you want to separate (for example) view templates, shader sources or other multiline texts from the Haxe source. The articles demonstrates how to do it with an expression macro but also with a build macro.‥
Mar 26, 2016 Macros / Generate dispatch code
Automatically generate dispatch functions as:‥
Mar 22, 2016 Macros / Add a static field
Virtually adds this static variable to a class: public inline static var STATIC_VAR:Float = 1.5;‥
Mar 22, 2016 Macros / Add property with getter
Virtually adds this property to a class: public var myVar(get, null):Float; private inline function get_myVar():Float { return 1.5; }‥
Mar 22, 2016 Macros / Create value-objects
This example generates a constructor-function for each field of a class to easily create value object classes.‥
Apr 03, 2016 Macros / Add a map
This snippet demonstrates how to add a map field to a type.‥