mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-08 23:43:18 +02:00
Add stepwise and time-based script execution with Step and RunFor methods
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace YesNt.Interpreter.Runtime;
|
||||
|
||||
/// <summary>
|
||||
/// The outcome of a single <see cref="YesNtInterpreter.StepOnce"/> call,
|
||||
/// or the aggregate result of <see cref="YesNtInterpreter.Step"/> /
|
||||
/// <see cref="YesNtInterpreter.RunFor"/>.
|
||||
/// </summary>
|
||||
public enum StepResult
|
||||
{
|
||||
/// <summary>
|
||||
/// A line was executed and more lines remain. Keep stepping to continue.
|
||||
/// </summary>
|
||||
Continue,
|
||||
|
||||
/// <summary>
|
||||
/// The step or time budget was exhausted before the script finished.
|
||||
/// <see cref="YesNtInterpreter.IsRunning"/> is still <see langword="true"/>;
|
||||
/// call any of the run methods again to resume.
|
||||
/// </summary>
|
||||
Paused,
|
||||
|
||||
/// <summary>
|
||||
/// The script ran to completion (end-of-file, explicit exit, or error).
|
||||
/// <see cref="YesNtInterpreter.IsRunning"/> is now <see langword="false"/>.
|
||||
/// </summary>
|
||||
Finished,
|
||||
}
|
||||
Reference in New Issue
Block a user