public override void Visit(ScopeAST scope) { var parentScopeId = _currentScopeId; _currentScopeId = ++_scopeIdGen; foreach (var element in scope.elements) { _currentNodePosition++; element.Accept(this); } _currentScopeId = parentScopeId; }
public override void Visit(ScopeAST scope) { _currentScope = new ScopeInfo { id = ++_scopeIdGen, parent = _currentScope }; _symTable.ScopeInfoDictionary.Add(_currentScope.id, _currentScope); foreach (var element in scope.elements) { _currentNodePosition++; element.Accept(this); } _currentScope = _currentScope.parent; }
public virtual void Visit(ScopeAST scope) { }