Пример #1
0
 public override Template Visit(StmtUsing stmt_using)
 {
     Template template = new Template("using <list; separator=\" \">");
     template.Add("list", stmt_using.List);
     return template;
 }
Пример #2
0
 public abstract Template Visit(StmtUsing stmt_using);
Пример #3
0
	private StmtUsing stmt_using()
	{
		EnterRule_stmt_using();
		EnterRule("stmt_using", 23);
		TraceIn("stmt_using", 23);
		StmtUsing value = default(StmtUsing);


		CommonTree b = default(CommonTree);
		string a = default(string);


			value = new StmtUsing();

		try { DebugEnterRule(GrammarFileName, "stmt_using");
		DebugLocation(321, 1);
		try
		{
			// SugarWalker.g:326:2: ( ^( Stmt_Using (a= ident |b= 'namespace' )* ) )
			DebugEnterAlt(1);
			// SugarWalker.g:326:4: ^( Stmt_Using (a= ident |b= 'namespace' )* )
			{
			DebugLocation(326, 4);
			DebugLocation(326, 6);
			Match(input,Stmt_Using,Follow._Stmt_Using_in_stmt_using1254); 

			if (input.LA(1) == TokenTypes.Down)
			{
				Match(input, TokenTypes.Down, null); 
				DebugLocation(326, 17);
				// SugarWalker.g:326:17: (a= ident |b= 'namespace' )*
				try { DebugEnterSubRule(43);
				while (true)
				{
					int alt43=3;
					try { DebugEnterDecision(43, false);
					int LA43_0 = input.LA(1);

					if ((LA43_0==IDENT))
					{
						alt43 = 1;
					}
					else if ((LA43_0==136))
					{
						alt43 = 2;
					}


					} finally { DebugExitDecision(43); }
					switch ( alt43 )
					{
					case 1:
						DebugEnterAlt(1);
						// SugarWalker.g:326:19: a= ident
						{
						DebugLocation(326, 20);
						PushFollow(Follow._ident_in_stmt_using1260);
						a=ident();
						PopFollow();

						DebugLocation(326, 27);
						 value.List.Add(a); 

						}
						break;
					case 2:
						DebugEnterAlt(2);
						// SugarWalker.g:327:10: b= 'namespace'
						{
						DebugLocation(327, 11);
						b=(CommonTree)Match(input,136,Follow._136_in_stmt_using1275); 
						DebugLocation(327, 24);
						 value.List.Add("namespace"); 

						}
						break;

					default:
						goto loop43;
					}
				}

				loop43:
					;

				} finally { DebugExitSubRule(43); }


				Match(input, TokenTypes.Up, null); 
			}


			}

		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		}
		finally
		{
			TraceOut("stmt_using", 23);
			LeaveRule("stmt_using", 23);
			LeaveRule_stmt_using();
		}
		DebugLocation(328, 1);
		} finally { DebugExitRule(GrammarFileName, "stmt_using"); }
		return value;

	}
Пример #4
0
 public abstract Template Visit(StmtUsing stmt_using);