public override void PrintRight(OutputStream sb) { if (printing) { return; } SwapAndRestore.Execute(ref printing, true, () => { Ref.PrintRight(sb); }); }
public override void PrintRight(OutputStream sb) { if (printing) return; SwapAndRestore.Execute(ref printing, true, () => { KeyValuePair<ReferenceKind, Node> collapsed = Collapse(sb); if (collapsed.Value.HasArray || collapsed.Value.HasFunction) sb.Append(')'); collapsed.Value.PrintRight(sb); }); }
public override void PrintLeft(OutputStream sb) { if (printing) { return; } SwapAndRestore.Execute(ref printing, true, () => { KeyValuePair <ReferenceKind, Node> collapsed = Collapse(sb); collapsed.Value.PrintLeft(sb); if (collapsed.Value.HasArray) { sb.Append(' '); } if (collapsed.Value.HasArray || collapsed.Value.HasFunction) { sb.Append('('); } sb.Append((collapsed.Key == ReferenceKind.LValue) ? "&" : "&&"); }); }