macro.ExprDef

ExprDef

package haxe-macro

import haxe.macro.Expr

Available on all platforms

Represents the kind of a node in the AST.

Values

EConst(c:Constant)

A constant.

EArray(e1:Expr, e2:Expr)

Array access e1[e2].

EBinop(op:Binop, e1:Expr, e2:Expr)

Binary operator e1 op e2.

EField(e:Expr, field:String)

Field access on e.field.

EParenthesis(e:Expr)

Parentheses (e).

EObjectDecl(fields:Array<{field:String, expr:Expr}>)

An object declaration.

EArrayDecl(values:Array<Expr>)

An array declaration [el].

ECall(e:Expr, params:Array<Expr>)

A call e(params).

ENew(t:TypePath, params:Array<Expr>)

A constructor call new t(params).

EUnop(op:Unop, postFix:Bool, e:Expr)

An unary operator op on e:

e++ (op = OpIncrement, postFix = true) e-- (op = OpDecrement, postFix = true) ++e (op = OpIncrement, postFix = false) --e (op = OpDecrement, postFix = false) -e (op = OpNeg, postFix = false) !e (op = OpNot, postFix = false) ~e (op = OpNegBits, postFix = false)

EVars(vars:Array<Var>)

Variable declarations-

EFunction(name:Null<String>, f:Function)

A function declaration.

EBlock(exprs:Array<Expr>)

A block of expressions {exprs}.

EFor(it:Expr, expr:Expr)

A for expression.

EIn(e1:Expr, e2:Expr)

A (e1 in e2) expression.

EIf(econd:Expr, eif:Expr, eelse:Null<Expr>)

An if(econd) eif or if(econd) eif else eelse expression.

EWhile(econd:Expr, e:Expr, normalWhile:Bool)

Represents a while expression. When normalWhile is true it is while (...). When normalWhile is false it is do {...} while (...).

ESwitch(e:Expr, cases:Array<Case>, edef:Null<Expr>)

Represents a switch expression with related cases and an optional. default case if edef != null.

ETry(e:Expr, catches:Array<Catch>)

Represents a try-expression with related catches.

EReturn(e:Expr)

A return or return e expression.

EBreak

A break expression.

EContinue

A continue expression.

EUntyped(e:Expr)

An untyped e source code.

EThrow(e:Expr)

A throw e expression.

ECast(e:Expr, t:Null<ComplexType>)

A cast e or cast (e, m) expression.

EDisplay(e:Expr, isCall:Bool)

Internally used to provide completion.

EDisplayNew(t:TypePath)

Internally used to provide completion.

ETernary(econd:Expr, eif:Expr, eelse:Expr)

A (econd) ? eif : eelse expression.

ECheckType(e:Expr, t:ComplexType)

A (e:t) expression.

EMeta(s:MetadataEntry, e:Expr)

A @m e expression.

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部