Example #1
0
 public override void print(Printer printer, Printer.Flags flags)
 {
     printer.addNode(left);
     printer.addString(" ");
     if (type != Token.BinOpType.Set)
     {
         printer.addString(type.GetAttribute <Token.OpAttribute>()?.name);
     }
     printer.addString("= ");
     printer.addArg(right);
 }
Example #2
0
            public override void print(Printer printer, Printer.Flags flags)
            {
                var wrap = (flags & Printer.Flags.InPar) == 0;

                if (wrap)
                {
                    printer.addString("(");
                }
                printer.addNode(left);
                printer.addString(" ");
                printer.addString(type.GetAttribute <Token.OpAttribute>()?.name);
                printer.addString(" ");
                printer.addNode(right);
                if (wrap)
                {
                    printer.addString(")");
                }
            }