SemanticPass2

The second pass determines the types of symbols and the types of expressions and also evaluates them.

Constructors

this
this(Module modul)

Constructs a SemanticPass2 object.

Members

Functions

enterScope
void enterScope(ScopeSymbol s)

Enters a new scope.

error
void error(Token* token, MID mid, ...)

Creates an error report.

exitScope
void exitScope()

Exits the current scope.

interpret
Expression interpret(Expression e)

Evaluates e and returns the result.

run
void run()

Start semantic analysis.

search
Symbol search(Token* idTok)

Searches for a symbol.

Variables

idScope
ScopeSymbol idScope;

The current scope symbol to use for looking up identifiers.

modul
Module modul;

The module to be semantically checked.

scop
Scope scop;

The current scope.

Meta