Example #1
0
        public object Visit(PrefixOperatorNode node)
        {
            var expr = Visit((dynamic)node.Expr);

            switch (node.Token.Type)
            {
            case TokenType.Not:
                return(!expr);

            case TokenType.Minus:
                return(-expr);

            case TokenType.BitwiseNot:
                return(~expr);

            default:
                return(expr);
            }
        }
Example #2
0
 public abstract object Visit(PrefixOperatorNode node);