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

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


                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());
            }
        }

        boolean isDictComplete = arity % 2 == 0;
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);
        DictComp dictComp = (DictComp) a1.value;

        assertEquals("name", ((Name) dictComp.key).id);
        assertEquals("value", ((Name) dictComp.value).id);
    }
View Full Code Here

TOP

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

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.