public override void PrintRight(OutputStream sb)
        {
            if (printing)
            {
                return;
            }

            SwapAndRestore.Execute(ref printing, true, () => {
                Ref.PrintRight(sb);
            });
        }
Exemplo n.º 2
0
		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);
			});
		}
Exemplo n.º 3
0
        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) ? "&" : "&&");
            });
        }