pub enum Instruction {
Show 15 variants ArrayAssignment(ArrayAssignmentSpan), Assignment(AssignmentSpan), BuiltinCall(BuiltinCallSpan), Call(JumpSpan), Dim(DimSpan), DimArray(DimArraySpan), End(EndSpan), Jump(JumpSpan), JumpIfDefined(JumpIfDefinedSpan), JumpIfTrue(JumpIfBoolSpan), JumpIfNotTrue(JumpIfBoolSpan), Nop, Return(ReturnSpan), SetErrorHandler(ErrorHandlerSpan), Unset(UnsetSpan),
}
Expand description

Representation of all possible instructions in the bytecode.

Variants§

§

ArrayAssignment(ArrayAssignmentSpan)

Represents an assignment to an element of an array.

§

Assignment(AssignmentSpan)

Represents a variable assignment.

§

BuiltinCall(BuiltinCallSpan)

Represents a call to a builtin command such as PRINT.

§

Call(JumpSpan)

Represents an unconditional call to a location that will return.

§

Dim(DimSpan)

Represents a variable definition.

§

DimArray(DimArraySpan)

Represents an array definition.

§

End(EndSpan)

Represents a request to terminate the program.

§

Jump(JumpSpan)

Represents an unconditional jump.

§

JumpIfDefined(JumpIfDefinedSpan)

Represents an conditional jump that jumps if the variable is defined.

§

JumpIfTrue(JumpIfBoolSpan)

Represents an conditional jump that jumps if the condition is met.

§

JumpIfNotTrue(JumpIfBoolSpan)

Represents an conditional jump that jumps if the condition is not met.

§

Nop

Represents an instruction that does nothing.

§

Return(ReturnSpan)

Represents a return after a call.

§

SetErrorHandler(ErrorHandlerSpan)

Represents a change in the error handler state.

§

Unset(UnsetSpan)

Represents a request to unset a variable.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.