Exemplo n.º 1
0
 public override Template Visit(StmtTry stmt_try)
 {
     Template template = new Template("try {\n    <body>\n} catch (<stmt>) {\n    <catch>\n}");
     template.Add("body", stmt_try.Body.Accept(this));
     template.Add("stmt", stmt_try.Stmt.Accept(this));
     template.Add("catch", stmt_try.Catch.Accept(this));
     return template;
 }
Exemplo n.º 2
0
 public abstract Template Visit(StmtTry stmt_try);
Exemplo n.º 3
0
	private Stmt stmt_try()
	{
		EnterRule_stmt_try();
		EnterRule("stmt_try", 31);
		TraceIn("stmt_try", 31);
		Stmt value = default(Stmt);


		StmtBlock a = default(StmtBlock);
		Stmt b = default(Stmt);
		StmtBlock c = default(StmtBlock);

		try { DebugEnterRule(GrammarFileName, "stmt_try");
		DebugLocation(413, 1);
		try
		{
			// SugarWalker.g:414:2: ( ^( Stmt_Try a= stmt_block b= stmt_alloc c= stmt_block ) )
			DebugEnterAlt(1);
			// SugarWalker.g:414:4: ^( Stmt_Try a= stmt_block b= stmt_alloc c= stmt_block )
			{
			DebugLocation(414, 4);
			DebugLocation(414, 6);
			Match(input,Stmt_Try,Follow._Stmt_Try_in_stmt_try1626); 

			Match(input, TokenTypes.Down, null); 
			DebugLocation(414, 16);
			PushFollow(Follow._stmt_block_in_stmt_try1630);
			a=stmt_block();
			PopFollow();

			DebugLocation(414, 29);
			PushFollow(Follow._stmt_alloc_in_stmt_try1634);
			b=stmt_alloc();
			PopFollow();

			DebugLocation(414, 42);
			PushFollow(Follow._stmt_block_in_stmt_try1638);
			c=stmt_block();
			PopFollow();


			Match(input, TokenTypes.Up, null); 

			DebugLocation(415, 2);

					value = new StmtTry(a, b, c);
				

			}

		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		}
		finally
		{
			TraceOut("stmt_try", 31);
			LeaveRule("stmt_try", 31);
			LeaveRule_stmt_try();
		}
		DebugLocation(418, 1);
		} finally { DebugExitRule(GrammarFileName, "stmt_try"); }
		return value;

	}
Exemplo n.º 4
0
 public abstract Template Visit(StmtTry stmt_try);