|
@@ -58,6 +58,19 @@ namespace NTERA.Engine.Runtime.Base
|
|
|
runtime.Call(runtime.ExecutionProvider.DefinedProcedures.First(x => x.Name == "SYSTEM_TITLE"));
|
|
|
}
|
|
|
|
|
|
+ [Keyword("GOTO", true)]
|
|
|
+ public static void Goto(EraRuntime runtime, StackFrame context, ExecutionNode node)
|
|
|
+ {
|
|
|
+ string target = runtime.ComputeExpression(context, node[0]).String;
|
|
|
+
|
|
|
+ var nodeTarget = context.ExecutionNodes.FirstOrDefault(x => x.Anchor == target);
|
|
|
+
|
|
|
+ if (nodeTarget == null)
|
|
|
+ throw new EraRuntimeException($"Could not find GOTO anchor '{target}'");
|
|
|
+
|
|
|
+ context.ExecutionIndex = context.ExecutionNodes.IndexOf(nodeTarget);
|
|
|
+ }
|
|
|
+
|
|
|
[Keyword("INPUT")]
|
|
|
public static void Input(EraRuntime runtime, StackFrame context, ExecutionNode node)
|
|
|
{
|