1234567891011121314151617181920212223242526272829303132333435 |
- using System.Collections.Generic;
- using NTERA.Engine.Compiler;
- namespace NTERA.Engine.Runtime
- {
- public class StackFrame
- {
- public Dictionary<string, Variable> LocalVariables { get; set; }
- public Dictionary<string, Variable> GlobalVariables { get; set; }
- public FunctionDefinition SelfDefinition { get; set; }
- }
- public enum ExecutionResultType
- {
- None,
- FunctionReturn
- }
- public class ExecutionResult
- {
- public static ExecutionResult None { get; } = new ExecutionResult(ExecutionResultType.None);
- public ExecutionResultType Type { get; }
- public Value? Result { get; }
- public ExecutionResult(ExecutionResultType type, Value? value = null)
- {
- Type = type;
- Result = value;
- }
- }
- }
|