Example #1
0
		public virtual bool VisitNamespace(NamespaceDescriptor ns)
		{
			if (VisitEnter(ns))
			{
				VisitNodes(ns.TypeDefinitions);

				return VisitLeave(ns);
			}

			return true;
		}
Example #2
0
		public override bool VisitNamespace(NamespaceDescriptor ns)
		{
			nodeStack.Push( CurrentNode.Nodes.Add("Namespace " + ns.Name) );
			CurrentNode.Tag = ns;

			CurrentNode.EnsureVisible();

			base.VisitNamespace(ns);

			nodeStack.Pop();

			return true;
		}
Example #3
0
		public virtual bool VisitLeave(NamespaceDescriptor ns)
		{
			return true;
		}
Example #4
0
		public virtual bool VisitEnter(NamespaceDescriptor ns)
		{
			return true;
		}
		public override bool VisitLeave(NamespaceDescriptor ns)
		{
			currentNamespace = null;

			return base.VisitLeave(ns);
		}
		public override bool VisitEnter(NamespaceDescriptor ns)
		{
			currentNamespace = ns.Name;

			return base.VisitEnter(ns);
		}
Example #7
0
		public override bool VisitLeave(NamespaceDescriptor ns)
		{
			nowQueue = false;
			return base.VisitLeave(ns);
		}
Example #8
0
		public override bool VisitEnter(NamespaceDescriptor ns)
		{
			nowQueue = true;
			return base.VisitEnter(ns);
		}
Example #9
0
	public void namespace_declaration(
		IList namespaces
	) //throws RecognitionException, TokenStreamException
{
		
		IToken  t = null;
		
			  NamespaceDescriptor nsdec = new NamespaceDescriptor(); 
			  PushScope(nsdec, ScopeType.Namespace);
			  namespaces.Add(nsdec); String qn = null;
			  TypeDefinitionStatement typeDef = null;
			
		
		try {      // for error handling
			t = LT(1);
			match(LITERAL_namespace);
			qn=qualified_name();
			statement_term();
			if (0==inputState.guessing)
			{
				nsdec.Name = qn;
			}
			{    // ( ... )*
				for (;;)
				{
					if ((LA(1)==CLASS))
					{
						typeDef=type_def_statement();
						if (0==inputState.guessing)
						{
							nsdec.TypeDefinitions.Add(typeDef);
						}
					}
					else
					{
						goto _loop22_breakloop;
					}
					
				}
_loop22_breakloop:				;
			}    // ( ... )*
			match(END);
			if (0==inputState.guessing)
			{
				PopScope();
			}
		}
		catch (RecognitionException ex)
		{
			if (0 == inputState.guessing)
			{
				reportError(ex);
				recover(ex,tokenSet_2_);
			}
			else
			{
				throw ex;
			}
		}
	}
Example #10
0
		public void Add(NamespaceDescriptor nsDesc)
		{
			this.InnerList.Add(nsDesc);
		}
Example #11
0
 public void Add(NamespaceDescriptor nsDesc)
 {
     this.InnerList.Add(nsDesc);
 }