Package org.python.pydev.parser.jython.ast

Examples of org.python.pydev.parser.jython.ast.BinOp


            case JJTAUG_FLOORDIVIDE:
                ret = new AugAssign(null, AugAssign.FloorDiv, null);
                break;

            case JJTOR_2OP:
                ret = new BinOp(null, BinOp.BitOr, null);
                break;
            case JJTXOR_2OP:
                ret = new BinOp(null, BinOp.BitXor, null);
                break;
            case JJTAND_2OP:
                ret = new BinOp(null, BinOp.BitAnd, null);
                break;
            case JJTLSHIFT_2OP:
                ret = new BinOp(null, BinOp.LShift, null);
                break;
            case JJTRSHIFT_2OP:
                ret = new BinOp(null, BinOp.RShift, null);
                break;
            case JJTADD_2OP:
                ret = new BinOp(null, BinOp.Add, null);
                break;
            case JJTSUB_2OP:
                ret = new BinOp(null, BinOp.Sub, null);
                break;
            case JJTMUL_2OP:
                ret = new BinOp(null, BinOp.Mult, null);
                break;
            case JJTDIV_2OP:
                ret = new BinOp(null, BinOp.Div, null);
                break;
            case JJTMOD_2OP:
                ret = new BinOp(null, BinOp.Mod, null);
                break;
            case JJTPOW_2OP:
                ret = new BinOp(null, BinOp.Pow, null);
                break;
            case JJTFLOORDIV_2OP:
                ret = new BinOp(null, BinOp.FloorDiv, null);
                break;

            case JJTPOS_1OP:
                ret = new UnaryOp(UnaryOp.UAdd, null);
                break;
View Full Code Here


            case JJTMUL_2OP:
            case JJTDIV_2OP:
            case JJTMOD_2OP:
            case JJTPOW_2OP:
            case JJTFLOORDIV_2OP:
                BinOp op = (BinOp) n;
                exprType right = (exprType) stack.popNode();
                exprType left = (exprType) stack.popNode();
                op.right = right;
                op.left = left;
                return n;
View Full Code Here

            }
            return val;
        }

        if (node instanceof BinOp) {
            BinOp binOp = (BinOp) node;
            if (binOp.left instanceof Str && binOp.op == BinOp.Mod) {
                node = binOp.left;
                //Just change the node... the check below will work with the Str already.
            }
        }
View Full Code Here

            return buf.toString();

        }

        if (node instanceof BinOp) {
            BinOp binOp = (BinOp) node;
            if (binOp.left instanceof Str && binOp.op == BinOp.Mod) {
                //It's something as 'aaa' % (1,2), so, we know it's a string.
                return getRepresentationString(node, true);
            }
        }
View Full Code Here

TOP

Related Classes of org.python.pydev.parser.jython.ast.BinOp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.