public void PushContext(DeclarationContext context) { foreach (var scopeDeclaration in context.Declarations) { if (ExistsInScope(scopeDeclaration.Value)) { // TODO: Need DebugInfo in here throw new DuplicateDeclarationException(new DebugInfo(), scopeDeclaration.Value); } } _contexts.Push(context); }
public void PushBlankContext(string name = null) { var context = new DeclarationContext(name, new HashSet <IDeclaration>()); PushContext(context); }