package
0.0.0-20250106073312-86710262a96c
Repository: https://github.com/codecrafters-io/interpreter-tester.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
Eval evaluates the given AST.
No description provided by the author
GetTokenName returns the name of the token given its value.
No description provided by the author
No description provided by the author
LogParseError reports in stderr an error encountered during parsing.
PrintRuntimeError reports a runtime error.
MakeParseError renders a parsing error as a string.
MakeRuntimeError creates a new runtime error.
New creates a new environment.
NewEnvironment creates a new local environment.
NewGlobal creates a new global environment.
NewParser creates a new parser.
No description provided by the author
NewUserFunction creates a new UserFunction.
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

HadParseError is true if a scanner/parser error was encountered.
HadRuntimeError is true if an evaluation error was encountered.

# Structs

Assign is used for variable assignment name = value.
Binary is used for binary operators.
Block is a curly-braced block statement that defines a local scope { ..
Call is the node of a function call.
Environment associates variables to values.
Expression statement.
Function is the function definition node.
Grouping is used for parenthesized expressions.
If is the classic if statement.
Literal values.
Logical is used for "or" and "and" operators.
NativeFunction is a builtin Lox function.
Parser will transform an array of tokens to an AST.
Print statement print 1 + 2.
Return is used to return from a function.
No description provided by the author
No description provided by the author
Token contains the lexeme read by the scanner.
Unary is used for unary operators.
UserFunction are functions defined in Lox code.
Var is the variable declaration statement var <name> = <initializer>.
Variable access expression print x.
While is the classic while statement.

# Interfaces

Callable is the generic interface for functions/classes in Lox.
Expr is the root class of expression nodes.
Node is the root class of AST nodes.
Stmt form a second hierarchy of syntax nodes independent of expressions.

# Type aliases

Type is the type of the token given as a string.