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<ObjectField>)

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(kind:Null<FunctionKind>, f:Function)

A function declaration.

EBlock(exprs:Array<Expr>)

A block of expressions {exprs}.

EFor(it:Expr, expr:Expr)

A for 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:Null<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, displayKind:DisplayKind)

Used internally to provide completion.

EDisplayNew(t:TypePath)

Used internally 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.

EIs(e:Expr, t:ComplexType)

An expr is Type expression.