Example #1
0
 public override Template Visit(ExprCast expr)
 {
     Template template = new Template("((<type>)<expr>)");
     template.Add("type", expr.Type);
     template.Add("expr", expr.Expr.Accept(this));
     return template;
 }
Example #2
0
 public abstract Template Visit(ExprCast expr);
Example #3
0
	private ExprCast cast_expr()
	{
		EnterRule_cast_expr();
		EnterRule("cast_expr", 44);
		TraceIn("cast_expr", 44);
		ExprCast value = default(ExprCast);


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

		try { DebugEnterRule(GrammarFileName, "cast_expr");
		DebugLocation(530, 1);
		try
		{
			// SugarWalker.g:531:2: ( ^( Expr_Cast a= type_name b= expr ) )
			DebugEnterAlt(1);
			// SugarWalker.g:531:4: ^( Expr_Cast a= type_name b= expr )
			{
			DebugLocation(531, 4);
			DebugLocation(531, 6);
			Match(input,Expr_Cast,Follow._Expr_Cast_in_cast_expr2107); 

			Match(input, TokenTypes.Down, null); 
			DebugLocation(531, 17);
			PushFollow(Follow._type_name_in_cast_expr2111);
			a=type_name();
			PopFollow();

			DebugLocation(531, 29);
			PushFollow(Follow._expr_in_cast_expr2115);
			b=expr();
			PopFollow();


			Match(input, TokenTypes.Up, null); 

			DebugLocation(532, 2);

					value = new ExprCast(a, b);
				

			}

		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		}
		finally
		{
			TraceOut("cast_expr", 44);
			LeaveRule("cast_expr", 44);
			LeaveRule_cast_expr();
		}
		DebugLocation(535, 1);
		} finally { DebugExitRule(GrammarFileName, "cast_expr"); }
		return value;

	}
Example #4
0
 public abstract Template Visit(ExprCast expr);