Ejemplo n.º 1
0
        /// <summary>
        /// Initialize this instance.
        /// </summary>
        /// <param name="outerScope">Outer scope</param>
        /// <param name="functionScopeTable">Function scope table.</param>
        /// <param name="name">Easy to debug name.</param>
        public ScopeContext(ScopeContext outerScope, Dictionary <RawFunctionNode, ScopeContext> functionScopeTable, string name)
        {
            OuterScope          = outerScope;
            _functions          = new List <string>();
            _innerScopes        = new List <ScopeContext>();
            _functionScopeTable = functionScopeTable;
            _scopeName          = name;

            outerScope?.AddInnerScope(this);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds the inner scope.
 /// </summary>
 /// <param name="scope">The scope.</param>
 private void AddInnerScope(ScopeContext scope)
 {
     _innerScopes.Add(scope);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initialize this instance.
 /// </summary>
 /// <param name="outerScope">Outer scope</param>
 /// <param name="name">Easy to debug name.</param>
 public ScopeContext(ScopeContext outerScope, string name)
     : this(outerScope, new Dictionary <RawFunctionNode, ScopeContext>(), name)
 {
 }