Fan

 

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

blockStackSource

Block[] blockStack := Block[,]

curryCountSource

Int curryCount := 0

enterBlockSource

override Void enterBlock(Block block)

Callback when entering a block.

enterMethodDefSource

override Void enterMethodDef(MethodDef m)

enterStmtSource

override Void enterStmt(Stmt stmt)

Callback when entering a stmt.

exitBlockSource

override Void exitBlock(Block block)

Callback when exiting a block.

inClosureSource

Bool inClosure := false

makeSource

new make(Compiler compiler)

runSource

override Void run()

Run the step

stmtStackSource

Stmt[] stmtStack := Stmt[,]

visitExprSource

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.

visitStmtSource

override Void visitStmt(Stmt stmt)

Callback when visiting a stmt.