This class provides some utility methods to work with typed expressions. It is best used through 'using haxe.macro.TypedExprTools' syntax and then provides additional methods on haxe.macro.TypedExpr instances.

Static methods

staticiter(e:TypedExpr, f:TypedExpr ‑> Void):Void

Calls function f on each sub-expression of e.

See haxe.macro.ExprTools.iter for details on iterating expressions in general. This function works the same way, but with a different data structure.

staticmap(e:TypedExpr, f:TypedExpr ‑> TypedExpr):TypedExpr

Transforms the sub-expressions of e by calling f on each of them.

See haxe.macro.ExprTools.map for details on expression mapping in general. This function works the same way, but with a different data structure.

staticmapWithType(e:TypedExpr, f:TypedExpr ‑> TypedExpr, ft:Type ‑> Type, fv:TVar ‑> TVar):TypedExpr

Transforms the sub-expressions of e by calling f on each of them. Additionally, types are mapped using ft and variables are mapped using fv.

See haxe.macro.ExprTools.map for details on expression mapping in general. This function works the same way, but with a different data structure.

@:value({ pretty : false })statictoString(t:TypedExpr, pretty:Bool = false):String

Available on macro