macro.TypedExprTools

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.

static toString (t:TypedExpr, pretty:Bool = false):String

Available on macro

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部