Пример #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);
 }