示例#1
0
        public override void Visit(UnaryOpNode node)
        {
            Contracts.AssertValue(node);

            if (TryShowValue(node))
            {
                return;
            }

            Precedence prec = GetPrec(node.Arg);

            _wrt.Write(GetString(node.Op));
            if (prec < Precedence.PrefixUnary)
            {
                _wrt.Write('(');
            }
            node.Arg.Accept(this);
            if (prec < Precedence.PrefixUnary)
            {
                _wrt.Write(')');
            }
            ShowType(node);
        }
示例#2
0
 public override void PostVisit(UnaryOpNode node)
 {
     Contracts.Assert(false);
 }
示例#3
0
 public abstract void Visit(UnaryOpNode node);
示例#4
0
 public override bool PreVisit(UnaryOpNode node)
 {
     Visit(node); return(false);
 }
示例#5
0
 public virtual bool PreVisit(UnaryOpNode node)
 {
     return(true);
 }