示例#1
0
 public override Template Visit(StmtTypeDef stmt_typedef)
 {
     Template template = new Template("typedef <type> <name>");
     template.Add("type", stmt_typedef.Type);
     template.Add("name", stmt_typedef.Name);
     return template;
 }
示例#2
0
 public override Template Visit(StmtTypeDef stmt_typedef)
 {
     Template template = new Template("using <name> = <type>");
     template.Add("type", stmt_typedef.Type.Accept(this));
     template.Add("name", stmt_typedef.Name);
     return template;
 }
示例#3
0
 public abstract Template Visit(StmtTypeDef stmt_typedef);
示例#4
0
	private StmtTypeDef stmt_typedef()
	{
		EnterRule_stmt_typedef();
		EnterRule("stmt_typedef", 24);
		TraceIn("stmt_typedef", 24);
		StmtTypeDef value = default(StmtTypeDef);


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

		try { DebugEnterRule(GrammarFileName, "stmt_typedef");
		DebugLocation(330, 1);
		try
		{
			// SugarWalker.g:331:2: ( ^( Stmt_Typedef a= type_name b= ident ) )
			DebugEnterAlt(1);
			// SugarWalker.g:331:4: ^( Stmt_Typedef a= type_name b= ident )
			{
			DebugLocation(331, 4);
			DebugLocation(331, 6);
			Match(input,Stmt_Typedef,Follow._Stmt_Typedef_in_stmt_typedef1296); 

			Match(input, TokenTypes.Down, null); 
			DebugLocation(331, 20);
			PushFollow(Follow._type_name_in_stmt_typedef1300);
			a=type_name();
			PopFollow();

			DebugLocation(331, 32);
			PushFollow(Follow._ident_in_stmt_typedef1304);
			b=ident();
			PopFollow();


			Match(input, TokenTypes.Up, null); 

			DebugLocation(332, 2);

					value = new StmtTypeDef(a, b);
				

			}

		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		}
		finally
		{
			TraceOut("stmt_typedef", 24);
			LeaveRule("stmt_typedef", 24);
			LeaveRule_stmt_typedef();
		}
		DebugLocation(335, 1);
		} finally { DebugExitRule(GrammarFileName, "stmt_typedef"); }
		return value;

	}
示例#5
0
 public abstract Template Visit(StmtTypeDef stmt_typedef);