public override void Write(TemplateRewriterContext context)
        {
            if (IsElseIf)
            {
                context.Write("else ");
            }
            context.Write("if").ExpectSpace();
            if (InvertCondition)
            {
                context.Write("!(");
            }
            context.Write(Condition);
            if (InvertCondition)
            {
                context.Write(")");
            }
            context.ExpectEos();

            context.Write(Then);

            context.Write(Else);

            if (!IsElseIf)
            {
                context.ExpectEnd();
            }
        }
 public override void Write(TemplateRewriterContext context)
 {
     context.Write("when").ExpectSpace();
     context.WriteListWithCommas(Values);
     context.ExpectEos();
     context.Write(Body);
     context.Write(Next);
 }
Example #3
0
 public override void Write(TemplateRewriterContext context)
 {
     context.Write("wrap").ExpectSpace();
     context.Write(Target);
     context.ExpectEos();
     context.Write(Body);
     context.ExpectEnd();
 }
Example #4
0
 public override void Write(TemplateRewriterContext context)
 {
     context.Write("with").ExpectSpace();
     context.Write(Name);
     context.ExpectEos();
     context.Write(Body);
     context.ExpectEnd();
 }
Example #5
0
 public override void Write(TemplateRewriterContext context)
 {
     context.Write("while").ExpectSpace();
     context.Write(Condition);
     context.ExpectEos();
     context.Write(Body);
     context.ExpectEnd();
 }
Example #6
0
 public override void Write(TemplateRewriterContext context)
 {
     if (Name != null)
     {
         context.Write("func").ExpectSpace();
         context.Write(Name);
     }
     context.ExpectEos();
     context.Write(Body);
     context.ExpectEnd();
 }
 public override void Write(TemplateRewriterContext context)
 {
     context.Write("tablerow").ExpectSpace();
     context.Write(Variable).ExpectSpace();
     context.Write("in").ExpectSpace();
     context.Write(Iterator);
     context.Write(NamedArguments);
     context.ExpectEos();
     context.Write(Body);
     context.ExpectEnd();
 }
Example #8
0
 public override void Write(TemplateRewriterContext context)
 {
     context.Write("for").ExpectSpace();
     context.Write(Variable).ExpectSpace();
     if (!context.PreviousHasSpace)
     {
         context.Write(" ");
     }
     context.Write("in").ExpectSpace();
     context.Write(Iterator);
     context.Write(NamedArguments);
     context.ExpectEos();
     context.Write(Body);
     context.ExpectEnd();
 }
Example #9
0
 public override void Write(TemplateRewriterContext context)
 {
     context.Write("readonly").ExpectSpace();
     context.Write(Variable);
     context.ExpectEos();
 }
 public override void Write(TemplateRewriterContext context)
 {
     context.Write("import").ExpectSpace();
     context.Write(Expression);
     context.ExpectEos();
 }