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

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


                            break;
                        default:
                            throw new RuntimeException("Unknown cmp op:" + op.getId());
                    }
                }
                return new Compare(((exprType) stack.popNode()), ops, comparators);
            case JJTLESS_CMP:
            case JJTGREATER_CMP:
            case JJTEQUAL_CMP:
            case JJTGREATER_EQUAL_CMP:
            case JJTLESS_EQUAL_CMP:
View Full Code Here


     * @param node the if node that we want to check.
     * @return null if the passed node is not
     */
    public static boolean isIfMAinNode(If node) {
        if (node.test instanceof Compare) {
            Compare compareNode = (Compare) node.test;
            // handcrafted structure walking
            if (compareNode.left instanceof Name && ((Name) compareNode.left).id.equals("__name__")
                    && compareNode.ops != null && compareNode.ops.length == 1 && compareNode.ops[0] == Compare.Eq) {

                if (compareNode.comparators != null && compareNode.comparators.length == 1
View Full Code Here

TOP

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

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.