using System.Collections.Generic;
namespace YesNt.Interpreter.Runtime;
///
/// Exposes the script runtime state accessible to custom statement handlers registered
/// via .
///
public interface IStatementContext
{
/// Gets the local variable table for the current scope.
Dictionary Variables { get; }
/// Gets or sets the global variable table shared across all scopes.
Dictionary GlobalVariables { get; set; }
/// Gets or sets the text of the line currently being processed.
/// Inline-substitution handlers (e.g. %read_line) write their result here.
string CurrentLine { get; set; }
/// Gets or sets the zero-based index of the next line to execute.
/// Set this to implement control-flow jumps inside a custom statement.
int LineNumber { get; set; }
/// Terminates execution with the given message.
/// The message written to debug output.
///
/// If , also terminates all tasks spawned by the task statement.
/// If , only terminates the current execution context (main script or individual task).
///
void Exit(string message, bool stopAllTasks);
}