![]() |
BadScript 2
|
Implements an Interactive Console for the BadScript Language. More...
Public Member Functions | |
BadInteractiveConsole (BadRuntime runtime, BadTaskRunner runner, IEnumerable< string > files) | |
Constructs a new BadInteractiveConsole instance. | |
void | Reset () |
Resets the Current Context. | |
BadObject | LoadIsolated (string file) |
Loads a File isolated from the Interactive Session. | |
void | Load (string file) |
Loads a File into the Interactive Session. | |
IEnumerable< object?> | RunIsolatedRoutine (string code) |
Runs a set of Expressions isolated from the Interactive Session. | |
BadObject | RunIsolated (string code) |
Runs a set of Expressions isolated from the Interactive Session. | |
void | Run (string code) |
Runs a set of Expressions. | |
Properties | |
BadScope? | CurrentScope [get] |
The Current Scope of the Interactive Console. | |
bool | CatchErrors [get, set] |
If true, the Interactive Console will catch and print errors. | |
bool | PreParse [get, set] |
If true, the Interactive Console will pre-parse the input before executing it. | |
Private Member Functions | |
BadExecutionContext | CreateContext () |
Creates a new Execution Context with the Interactive Console Api. | |
IEnumerable< object?> | RunRoutine (IEnumerable< BadExpression > expressions) |
The Routine that is used to execute the Interactive Session. | |
void | Run (IEnumerable< BadExpression > expressions) |
Runs a set of Expressions. | |
Private Attributes | |
readonly BadInteractiveConsoleApi | m_Api |
The Interactive API. | |
readonly BadTaskRunner | m_Runner |
The Task runner. | |
readonly BadRuntime | m_Runtime |
The Execution Context Options. | |
BadExecutionContext? | m_Context |
The Execution Context. | |
Implements an Interactive Console for the BadScript Language.
Definition at line 22 of file BadInteractiveConsole.cs.
BadScript2.Interactive.BadInteractiveConsole.BadInteractiveConsole | ( | BadRuntime | runtime, |
BadTaskRunner | runner, | ||
IEnumerable< string > | files | ||
) |
Constructs a new BadInteractiveConsole instance.
runtime | The Runtime that the Interactive Console will be started from. |
runner | The Task runner |
files | The Files that are loaded before the interactive session begins |
Definition at line 50 of file BadInteractiveConsole.cs.
|
private |
Creates a new Execution Context with the Interactive Console Api.
Definition at line 82 of file BadInteractiveConsole.cs.
void BadScript2.Interactive.BadInteractiveConsole.Load | ( | string | file | ) |
Loads a File into the Interactive Session.
file | The File to be Loaded |
Definition at line 129 of file BadInteractiveConsole.cs.
BadObject BadScript2.Interactive.BadInteractiveConsole.LoadIsolated | ( | string | file | ) |
Loads a File isolated from the Interactive Session.
file | The File to be Executed |
BadRuntimeException | Gets raised if the context was not initialized |
Definition at line 108 of file BadInteractiveConsole.cs.
void BadScript2.Interactive.BadInteractiveConsole.Reset | ( | ) |
Resets the Current Context.
Definition at line 97 of file BadInteractiveConsole.cs.
|
private |
Runs a set of Expressions.
expressions | The Expressions to be Executed |
BadRuntimeException | Gets raised if the context was not initialized |
Definition at line 182 of file BadInteractiveConsole.cs.
void BadScript2.Interactive.BadInteractiveConsole.Run | ( | string | code | ) |
Runs a set of Expressions.
code | The Source Code |
Definition at line 280 of file BadInteractiveConsole.cs.
BadObject BadScript2.Interactive.BadInteractiveConsole.RunIsolated | ( | string | code | ) |
Runs a set of Expressions isolated from the Interactive Session.
code | The Source Code |
BadRuntimeException | Gets raised if the context was not initialized |
Definition at line 259 of file BadInteractiveConsole.cs.
IEnumerable< object?> BadScript2.Interactive.BadInteractiveConsole.RunIsolatedRoutine | ( | string | code | ) |
Runs a set of Expressions isolated from the Interactive Session.
code | The Source Code |
BadRuntimeException | Gets raised if the context was not initialized |
Definition at line 234 of file BadInteractiveConsole.cs.
|
private |
The Routine that is used to execute the Interactive Session.
expressions | The Expressions to be executed |
BadRuntimeException | Gets raised if the context was not initialized |
Definition at line 141 of file BadInteractiveConsole.cs.
|
private |
The Interactive API.
Definition at line 27 of file BadInteractiveConsole.cs.
|
private |
The Execution Context.
Definition at line 42 of file BadInteractiveConsole.cs.
|
private |
The Task runner.
Definition at line 32 of file BadInteractiveConsole.cs.
|
private |
The Execution Context Options.
Definition at line 37 of file BadInteractiveConsole.cs.
|
getset |
If true, the Interactive Console will catch and print errors.
Definition at line 71 of file BadInteractiveConsole.cs.
|
get |
The Current Scope of the Interactive Console.
Definition at line 66 of file BadInteractiveConsole.cs.
|
getset |
If true, the Interactive Console will pre-parse the input before executing it.
Definition at line 76 of file BadInteractiveConsole.cs.