Routine class final

A Lox routine.

A Lox routine may be either a regular function, a method or a class initializer.

Implemented types

Constructors

Routine.new({required FunctionStatement declaration, required Environment closure, required RoutineType type})
Create a Lox routine.
const

Properties

arity int
The arity of the callable.
no setteroverride
declaration → FunctionStatement
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Instance instance) Routine
Binds this routing to a class instance.
call(Interpreter interpreter, List<Object?> arguments) Object?
The method to be executed when the callable is called.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited