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

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


        }

        if (dictNode0 instanceof ComprehensionCollection) {
            if (arity == 2) {
                ComprehensionCollection comp = (ComprehensionCollection) dictNode0;
                return new SetComp((exprType) stack.popNode(), comp.getGenerators());

            } else if (arity == 3) {
                SimpleNode dictNode1 = stack.popNode(); //we must inverse things here...
                ComprehensionCollection comp = (ComprehensionCollection) dictNode0;
                return new DictComp((exprType) stack.popNode(), (exprType) dictNode1, comp.getGenerators());
View Full Code Here


        SimpleNode ast = parseLegalDocStr(s);
        Module m = (Module) ast;
        Assign a0 = (Assign) m.body[0];
        Assign a1 = (Assign) m.body[1];
        assertTrue(a0.value instanceof Dict);
        SetComp setComp = (SetComp) a1.value;

        assertEquals("name", ((Name) setComp.elt).id);
    }
View Full Code Here

TOP

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

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.