logo

class

compiler::ResolveExpr

sys::Obj
  compiler::CompilerSupport
    compiler::CompilerStep
      compiler::ResolveExpr

Walk the AST to resolve:

  • Manage local variable scope
  • Resolve loop for breaks and continues
  • Resolve LocalDefStmt.init into full assignment expression
  • Resolve Expr.ctype
  • Resolve UknownVarExpr -> LocalVarExpr, FieldExpr, or CallExpr
  • Resolve CallExpr to their CMethod

Slots

blockStack

Block[] blockStack := Block[,]

Source

curryCount

Int curryCount := 0

Source

enterBlock

override Void enterBlock(Block block)

Callback when entering a block.

Source

enterMethodDef

override Void enterMethodDef(MethodDef m)

Source

enterStmt

override Void enterStmt(Stmt stmt)

Callback when entering a stmt.

Source

exitBlock

override Void exitBlock(Block block)

Callback when exiting a block.

Source

inClosure

Bool inClosure := false

Source

make

new make(Compiler compiler)

Source

run

override Void run()

Run the step

Source

stmtStack

Stmt[] stmtStack := Stmt[,]

Source

visitExpr

override Expr visitExpr(Expr expr)

Call to visit an expression. Return expr or a new expression if doing a replacement for the expression in the abstract syntax tree.

Source

visitStmt

override Void visitStmt(Stmt stmt)

Callback when visiting a stmt.

Source