Documentation ¶
Overview ¶
Package resolver proVides tool for resolving variable and function declarations
Index ¶
- type ResolveError
- type Resolver
- func (r *Resolver) ResolveExprs(exprs ast.Exprs) error
- func (r *Resolver) VisitAssignment(a ast.Assignment) any
- func (r *Resolver) VisitBinary(b ast.Binary) any
- func (r *Resolver) VisitCallExpr(c ast.Call) any
- func (r *Resolver) VisitFnExpr(f ast.FnExpr) any
- func (r *Resolver) VisitGrouping(g ast.Grouping) any
- func (r *Resolver) VisitIfExpr(i ast.IfExpr) any
- func (r *Resolver) VisitLiteral(l ast.Literal) any
- func (r *Resolver) VisitReturnExpr(re ast.Return) any
- func (r *Resolver) VisitUnary(u ast.Unary) any
- func (r *Resolver) VisitVarDecl(v ast.VarDecl) any
- func (r *Resolver) VisitWhileExpr(w ast.WhileExpr) any
- type UndeclaredVarErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResolveError ¶
type ResolveError []error
func (ResolveError) Error ¶
func (p ResolveError) Error() string
type Resolver ¶
type Resolver struct { Scopes []map[string]bool Globals map[string]bool // contains filtered or unexported fields }
Stores state required to resolve a parse tree
func (*Resolver) VisitAssignment ¶
func (r *Resolver) VisitAssignment(a ast.Assignment) any
type UndeclaredVarErr ¶
type UndeclaredVarErr struct {
// contains filtered or unexported fields
}
func (UndeclaredVarErr) Error ¶
func (u UndeclaredVarErr) Error() string
Click to show internal directories.
Click to hide internal directories.