logo

class

compiler::Block

sys::Obj
  compiler::Node
    compiler::Block

Block is a list of zero or more Stmts

Slots

add

Void add(Stmt stmt)

Append a statement

addAll

Void addAll(Stmt[] stmts)

Append a list of statements

isEmpty

Bool isEmpty()

Return is there are no statements

isExit

Bool isExit()

Does this block always cause us to exit the method (does the last statement return true for Stmt.isExit)

make

new make(Location location)

print

override Void print(AstWriter out)

printOpt

Void printOpt(AstWriter out, Bool braces := true)

size

Int size()

Return number of statements

stmts

Stmt[] stmts

walk

Void walk(Visitor v, VisitDepth depth)

walkExpr

Void walkExpr(|Expr -> Expr| closure)