Ejemplo n.º 1
0
        public override IProgramPart VisitUnarySign(FSQLParser.UnarySignContext context)
        {
            var right = Visit(context.right) as IExpression;
            var op    = context.op;

            return(op.Type != FSQLLexer.MINUS
                ? right
                : OneTermExpression.Create(right, r => r * -1, "-"));
        }
Ejemplo n.º 2
0
        public override IProgramPart VisitInvertBoolean(FSQLParser.InvertBooleanContext context)
        {
            var right = Visit(context.boolExpr) as IExpression;

            return(OneTermExpression.Create(right, r => !r, "NOT "));
        }