analyzer

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL