class haxe.macro.Compiler

Available on neko

All these methods can be called for compiler configuration macros.

Class Fields

static function addClassPath(path:String):Void

static function addMetadata(meta:String, className:String, ?field:String, ?isStatic:Bool):Void

static function addNativeLib(name:String):Void

Adds a native library depending on the platform (eg : -swf-lib for Flash)

static function allowPackage(v:String):Void

static function define(flag:String, ?value:String):Void

static function exclude(pack:String, ?rec:Bool):Void

Exclude a given class or a complete package from being generated.

static function excludeFile(fileName:String):Void

Exclude classes listed in an extern file (one per line) from being generated.

static function getDefine(key:Dynamic):Dynamic

static function getDisplayPos():Null<{pos:Int, file:String}>

static function getOutput():String

static function include(pack:String, ?rec:Bool, ?ignore:Array<String>, ?classPaths:Array<String>):Void

Include for compilation all classes defined in the given package excluding the ones referenced in the ignore list.

static function keep(?path:String, ?paths:Array<String>, ?rec:Bool):Void

Mark a class (or array of classes) with the metadata @:keep.

Note that this does not imply inclusion of the class(es): If a class is neither referenced nor added via [Compiler.include], it will not be part of the output even if @:keep was added.

static function patchTypes(file:String):Void

Load a type patch file that can modify declared classes fields types

static function removeField(className:String, field:String, ?isStatic:Bool):Void

static function setCustomJSGenerator(callb:JSGenApi ->Void):Void

Change the default JS output by using a custom generator callback

static function setFieldType(className:String, field:String, type:String, ?isStatic:Bool):Void

static function setOutput(fileOrDir:String):Void