public void Print(OutputContext output, bool forceParens = false) { output.PushNode(this); if (this is AstToplevel) { output.AddMapping(null, new Position(), true); } else { output.AddMapping(Source, Start, true); } if (forceParens || NeedParens(output)) { output.Print("("); CodeGen(output); output.Print(")"); } else { CodeGen(output); } output.PopNode(); }
public void Print(OutputContext output, bool forceParens = false) { output.PushNode(this); if (forceParens || !output.HasParens() && NeedParens(output)) { output.Print("("); CodeGen(output); output.Print(")"); } else { CodeGen(output); } output.PopNode(); }