private void Do(Action action)
        {
            if (pendingNewline && !isEmpty)
            {
                inner.NewLine();
            }

            pendingNewline = false;
            isEmpty        = false;

            action();
        }
Beispiel #2
0
 public void Visit(BoundIfStatement ifs)
 {
     sa.TabPrint("if ");
     ifs.Condition.Accept(this);
     ifs.TrueBlock.Accept(this);
     ifs.FalseBlock.MatchSome(b =>
     {
         sa.NewLine();
         sa.TabPrint("else");
         sa.NewLine();
         b.Accept(this);
     });
 }