Exemple #1
0
        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);
        }
Exemple #2
0
        public void PushBlankContext(string name = null)
        {
            var context = new DeclarationContext(name, new HashSet <IDeclaration>());

            PushContext(context);
        }