Context

class haxe.macro.ContextAvailable in flash8, flash, neko, js, php, cppThis is an API that can be used by macros implementations. static function addResource( name : String, data : Bytes ) : VoidAvailable in nekoAdd or modify a resource that will be accessible with haxe.Resource api. static function currentPos() : PositionAvailable in nekoReturns the position at which the macro is called static function defineType( t : TypeDefinition ) : VoidAvailable in nekoDefine a new type based on the given definition. static function defined( s : String ) : BoolAvailable in nekoTells is the given compiler directive has been defined with -D static function error( msg : String, pos : Position ) : DynamicAvailable in nekoDisplay a compilation error at the given position in code static function follow( t : Type, ?once : Bool ) : TypeAvailable in nekoFollow all typedefs to reach the actual real type static function getBuildFields() : Array<Field>Available in nekoReturns the list of fields for the current type inside the build macro. static function getClassPath() : Array<String>Available in nekoReturn the current classpath static function getLocalClass() : Null<Ref<ClassType>>Available in nekoReturns the current class in which the macro is called static function getLocalType() : Null<Type>Available in nekoReturns the current type in/on which the macro is called static function getModule( name : String ) : Array<Type>Available in nekoReturn the list of types defined in the given compilation unit module static function getPosInfos( p : Position ) : { min : Int, max : Int, file : String }Available in nekoGet the informations stored into a given position. static function getType( name : String ) : TypeAvailable in nekoResolve a type from its name. static function getTypedExpr( t : TypedExpr ) : ExprAvailable in nekoReturn the raw expression corresponding to the given typed expression. static function makeExpr( v : Dynamic, pos : Position ) : ExprAvailable in nekoBuild an expression corresponding to the given runtime value. Only basic types + enums are supported. static function makePosition( inf : { min : Int, max : Int, file : String } ) : PositionAvailable in nekoBuild a position with the given informations. static function onGenerate( callb : Array<Type> -> Void ) : VoidAvailable in nekoSet a callback function that will return all the types compiled before they get generated. static function parse( expr : String, pos : Position ) : ExprAvailable in nekoParse an expression. static function parseInlineString( expr : String, pos : Position ) : ExprAvailable in nekoParse a string contained into source code into the corresponding expression. Errors positions are reported within this string static function registerModuleDependency( modulePath : String, externFile : String ) : VoidAvailable in nekoManually add a dependency between a module and a third party file : make sure the module gets recompiled (if it was cached) in case the extern file has been modified as well. static function registerModuleReuseCall( modulePath : String, macroCall : String ) : VoidAvailable in nekoAdd a macro call to perform in case the module is reused by the compilation cache. static function resolvePath( file : String ) : StringAvailable in nekoResolve a filename based on current classpath. static function signature( v : Dynamic ) : StringAvailable in nekoQuickly build an hashed MD5 signature for any given value static function typeof( e : Expr ) : TypeAvailable in nekoEvaluate the type a given expression would have in the context of the current macro call. static function warning( msg : String, pos : Position ) : VoidAvailable in nekoDisplay a compilation warning at the given position in code
version #13299, modified 2012-04-12 22:29:01 by api

0 Comments