public override Template Visit(Root root)
 {
     Template template = new Template("#include \"<header>\"\n\n<body>");
     template.Add("header", this.HeaderFileName);
     template.Add("body", root.Block.Accept(this));
     return template;
 }
示例#2
0
 public override Template Visit(Root root)
 {
     Template template = new Template("#pragma once\n\n<declare>\n\n<body>");
     string declare = Declare(root.Block).Render();
     if (declare == "")
     {
         template = new Template("#pragma once\n\n<declare><body>");
     }
     template.Add("declare", declare);
     template.Add("body", root.Block.Accept(this));
     return template;
 }
示例#3
0
 public override Template Visit(Root root)
 {
     return root.Block.Accept(this);
 }
示例#4
0
	public Root root()
	{
		EnterRule_root();
		EnterRule("root", 1);
		TraceIn("root", 1);
		Root value = default(Root);


		GlobalBlock a = default(GlobalBlock);

		try { DebugEnterRule(GrammarFileName, "root");
		DebugLocation(32, 1);
		try
		{
			// SugarWalker.g:33:2: ( ^( Root a= global_block ) )
			DebugEnterAlt(1);
			// SugarWalker.g:33:4: ^( Root a= global_block )
			{
			DebugLocation(33, 4);
			DebugLocation(33, 6);
			Match(input,Root,Follow._Root_in_root76); 

			Match(input, TokenTypes.Down, null); 
			DebugLocation(33, 12);
			PushFollow(Follow._global_block_in_root80);
			a=global_block();
			PopFollow();


			Match(input, TokenTypes.Up, null); 

			DebugLocation(34, 2);

					value = new Root(a);
				

			}

		}
		catch (RecognitionException re)
		{
			ReportError(re);
			Recover(input,re);
		}
		finally
		{
			TraceOut("root", 1);
			LeaveRule("root", 1);
			LeaveRule_root();
		}
		DebugLocation(37, 1);
		} finally { DebugExitRule(GrammarFileName, "root"); }
		return value;

	}
示例#5
0
 public abstract Template Visit(Root root);
示例#6
0
 public override Template Visit(Root root)
 {
     Template template = new Template("#pragma once\n\n<body>");
     template.Add("body", root.Block.Accept(this));
     return template;
 }