public Scope(DSSymbolTable vSymbolTable, Scope TopScope, bool CaseSensitive) { SymbolTable = vSymbolTable; this.TopScope = null; if (TopScope != null) { this.TopScope = TopScope; TopScope.InternalScopes.Add(this); } ScopeNum = SymbolTable.GetNewScopeNum(); SymbolTable.ScopeTable.Add(this); this.CaseSensitive = CaseSensitive; Symbols = new SymbolsDictionary(); InternalScopes = new List <Scope>(); }
public Scope(DSSymbolTable vSymbolTable, Scope TopScope, string Name) { SymbolTable = vSymbolTable; this.TopScope = null; if (TopScope != null) { this.TopScope = TopScope; TopScope.InternalScopes.Add(this); } this.Name = Name; ScopeNum = SymbolTable.GetNewScopeNum(); SymbolTable.ScopeTable.Add(this); CaseSensitive = SemanticRules.SymbolTableCaseSensitive; Symbols = new SymbolsDictionary(); InternalScopes = new List <Scope>(); }