package semantic

import "github.com/azin-lang/Azin/internal/semantic"

Index

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}
func New
func New() *Analyzer
func (*Analyzer) Analyze
func (a *Analyzer) Analyze(program *ast.Program) error

type Scope

type Scope struct {
	Parent  *Scope
	Symbols map[string]*Symbol
}

type Symbol

type Symbol struct {
	Name string
	Type *ast.Identifier
	Kind SymbolKind

	Function *ast.FuncStmt
	Struct   *ast.StructStmt

	Inferring bool
}

type SymbolKind

type SymbolKind uint8
const (
	SymbolVariable SymbolKind = iota
	SymbolFunction
	SymbolStruct
)