Documentation ¶
Overview ¶
Package analyzer implements semantic analysis compiler passes by traversing the abstract syntax tree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NameAnalysis ¶
type NameAnalysis interface {
Analyze()
}
Name analysis is a compiler pass that validates the correctness of identifier declarations and their usage. It fills in the symbol table with declared identifiers and their types. It also checks for duplicate declarations and undeclared identifiers. As a final step, the closure of each block is determined.
func NewNameAnalysis ¶
func NewNameAnalysis(abstractSyntax ast.Block, errorHandler cor.ErrorHandler, tokenHandler cor.TokenHandler) NameAnalysis
Return the public interface of the private name analysis implementation.
Click to show internal directories.
Click to hide internal directories.