mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 09:06:41 +02:00
Remove Initialize calls and add AddStatement tests
This commit is contained in:
@@ -60,21 +60,19 @@ public class YesNtInterpreter
|
||||
AddStatement(new StatementAttribute(name, searchMode, spaceAround, consoleColor), handler);
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
public YesNtInterpreter()
|
||||
{
|
||||
runtimeInfo.Exit("Terminated by external process", true);
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
statements.Clear();
|
||||
staticStatements.Clear();
|
||||
GeneratedStatementRegistry.Register(runtimeInfo, out statements, out staticStatements);
|
||||
|
||||
runtimeInfo.OnDebugOutput += (s) => OnDebugOutput?.Invoke(s);
|
||||
runtimeInfo.OnLineExecuted += (DebugEventArgs e) => OnLineExecuted?.Invoke(e);
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
runtimeInfo.Exit("Terminated by external process", true);
|
||||
}
|
||||
|
||||
public void Execute(string path, bool isDebugMode = false)
|
||||
{
|
||||
runtimeInfo.Reset();
|
||||
|
||||
Reference in New Issue
Block a user