Interpreter class
Constructors
Properties
- environment ↔ Environment
-
getter/setter pair
- globals ↔ Environment
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
locals
↔ Map<
Expr, int> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkNumberOperand(
Token operator, Object? operand) → void -
checkNumberOperands(
Token operator, Object? left, Object? right) → void -
evaluate(
Expr expr) → Object? -
execute(
Stmt stmt) → void -
executeBlock(
List< Stmt> statements, Environment environment) → void -
interpret(
List< Stmt> statements) → void -
invokeFunction(
String name) → dynamic -
isEqual(
Object? a, Object? b) → bool -
isTruthy(
Object? object) → bool -
lookUpVariable(
Token name, Expr expr) → Object? -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerGlobal(
String name, Object obj) → void -
registerLocal(
String name, Object obj) → void -
resolve(
Expr expr, int depth) → void -
stringify(
Object? object) → String -
toString(
) → String -
A string representation of this object.
inherited
-
visitAnonymousExpr(
Anonymous expr) → Object? -
override
-
visitArrayExpr(
Array expr) → Object -
override
-
visitArrayifExpr(
Arrayif expr) → Object? -
override
-
visitAssignExpr(
Assign expr) → Object? -
override
-
visitAwaitExpr(
Await expr) → Object? -
override
-
visitBinaryExpr(
Binary expr) → Object? -
override
-
visitBlockStmt(
Block stmt) → void -
override
-
visitCallExpr(
Call expr) → Object? -
override
-
visitClassStmt(
Class stmt) → void -
override
-
visitConditionalExpr(
Conditional expr) → Object? -
override
-
visitDictExpr(
Dict expr) → Object -
override
-
visitExpressionStmt(
Expression stmt) → void -
override
-
visitFunctionalStmt(
Functional stmt) → void -
override
-
visitGetExpr(
Get expr) → Object? -
override
-
visitGroupingExpr(
Grouping expr) → Object? -
override
-
visitIfStmt(
If stmt) → void -
override
-
visitIndexingExpr(
Indexing expr) → Object? -
override
-
visitIndexSetExpr(
IndexSet expr) → Object? -
override
-
visitLiteralExpr(
Literal expr) → Object? -
override
-
visitLogicalExpr(
Logical expr) → Object? -
override
-
visitMappingExpr(
Mapping expr) → Object? -
override
-
visitNamedArgsExpr(
NamedArgs expr) → Object -
override
-
visitPrintStmt(
Print stmt) → void -
override
-
visitReturnStmt(
Return stmt) → void -
override
-
visitSetExpr(
Set expr) → Object? -
override
-
visitSuperExpr(
Super expr) → Object? -
override
-
visitThenExpr(
Then expr) → Object? -
override
-
visitThisExpr(
This expr) → Object? -
override
-
visitUnaryExpr(
Unary expr) → Object? -
override
-
visitVariableExpr(
Variable expr) → Object? -
override
-
visitVarStmt(
Var stmt) → void -
override
-
visitWhileStmt(
While stmt) → void -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- hadError ↔ bool
-
getter/setter pair
- hadRuntimeError ↔ bool
-
getter/setter pair