new Parse(codebox) → {Fish.Parse}
Parseis a codebox. Objects of this type are Event Emitters (SoupEvents)
Parameters:
Name | Type | Description |
---|---|---|
codebox |
String | object | Either a string of code, or a Fish#Codebox |
Returns:
An object which can control code execution and register event listeners (@see SoupEvents).
- Type
- Fish.Parse
Members
codebox
The Fish.Codebox of the program
finished
True if the program has finished running, false otherwise
ip
Current location and direction of the instruction pointer
running
True if the program is currently running, false otherwise
speed
Speed of the execution, in Ticks per Second. Can be manipulated
stack
A copy of the current stack
started
True if the program has been started, false otherwise
stdin
Writes a string to stdin. It will be parsed after everything which has previously been written to stdin
stdout
Perform operations on the output stream
Methods
start(initialStackopt, animatedopt)
Starts the execution of the program
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
initialStack |
Array |
<optional> |
Stack to start the program with. Defaults to [] |
animated |
boolean |
<optional> |
True to make a delay between each instruction, false to have it execute immediately. Default: true |