haXe API Documentation
Back | Index
class haxe.macro.Context
Available in neko
This is an API that can be used by macros implementations.
static function addResource(name : String, data : haxe.io.Bytes) : Void
static function currentPos() : Position
static function defineType(t : TypeDefinition) : Void
static function defined(s : String) : Bool
static function definedValue(key : String) : String
static function error(msg : String, pos : Position) : Dynamic
Display a compilation error at the given position in code and abort the current macro call
static function follow(t : Type, ?once : Bool) : Type
static function getBuildFields() : Array<Field>
static function getClassPath() : Array<String>
static function getLocalClass() : Null<Ref<ClassType>>
static function getLocalMethod() : Null<String>
static function getLocalType() : Null<Type>
static function getLocalUsing() : Array<Ref<ClassType>>
static function getLocalVars() : haxe.ds.StringMap<Type>
static function getModule(name : String) : Array<Type>
static function getPosInfos(p : Position) : { min : Int, max : Int, file : String}
static function getType(name : String) : Type
static function getTypedExpr(t : TypedExpr) : Expr
static function makeExpr(v : Dynamic, pos : Position) : Expr
static function makePosition(inf : { min : Int, max : Int, file : String}) : Position
static function onGenerate(callb : Array<Type> -> Void) : Void
static function onTypeNotFound(callb : String -> TypeDefinition) : Void
static function parse(expr : String, pos : Position) : Expr
static function parseInlineString(expr : String, pos : Position) : Expr
static function registerModuleDependency(modulePath : String, externFile : String) : Void
static function registerModuleReuseCall(modulePath : String, macroCall : String) : Void
static function resolvePath(file : String) : String
static function signature(v : Dynamic) : String
static function toComplexType(t : Type) : Null<ComplexType>
static function typeof(e : Expr) : Type
static function unify(t1 : Type, t2 : Type) : Bool
static function warning(msg : String, pos : Position) : Void
Back | Index