W3cubDocs

/Haxe

TypedExprTools

package haxe.macro

Available on all platforms

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

static iter (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.

static map (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.

static mapWithType (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 }) static toString (t:TypedExpr, pretty:Bool = false):String

Available on macro

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/haxe/macro/TypedExprTools.html