Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
StackFrame.cs
Go to the documentation of this file.
1 #region License
2 /* **********************************************************************************
3  * Copyright (c) Roman Ivantsov
4  * This source code is subject to terms and conditions of the MIT License
5  * for Irony. A copy of the license can be found in the License.txt file
6  * at the root of this distribution.
7  * By using this source code in any fashion, you are agreeing to be bound by the terms of the
8  * MIT License.
9  * You must not remove this notice from this software.
10  * **********************************************************************************/
11 #endregion
12 
13 using System;
14 using System.Collections.Generic;
15 using System.Text;
16 using Irony.Parsing;
17 using Irony.Interpreter.Ast;
18 
19 namespace Irony.Interpreter {
20 
21  public class StackFrame {
22  public readonly EvaluationContext Context;
23  public string MethodName; //for debugging purposes
24  public StackFrame Parent; //Lexical parent - not the same as the caller
26  internal ValuesTable Values; //global values for top frame; parameters and local variables for method frame
27 
28  public StackFrame(EvaluationContext context, ValuesTable globals) {
29  Context = context;
30  Values = globals;
31  if (Values == null)
32  Values = new ValuesTable(100);
33  }
34 
35  public StackFrame(EvaluationContext context, string methodName, StackFrame caller, StackFrame parent) {
36  MethodName = methodName;
37  Caller = caller;
38  Parent = parent;
39  Values = new ValuesTable(8);
40  }
41 
42  }//class
43 
44 }//namespace
readonly EvaluationContext Context
Definition: StackFrame.cs:22
StackFrame(EvaluationContext context, ValuesTable globals)
Definition: StackFrame.cs:28
StackFrame(EvaluationContext context, string methodName, StackFrame caller, StackFrame parent)
Definition: StackFrame.cs:35