Package org.apache.flex.compiler.internal.tree.as

Examples of org.apache.flex.compiler.internal.tree.as.LabeledStatementNode


                    }
                }
                break;
            case LabledStatementID:
                {
                    LabeledStatementNode labelNode = (LabeledStatementNode) node;
                    String labelName = labelNode.getLabel();
                    if (labelName != null)
                        labelMap.put(labelName, labelNode);
                    populateLabelMap(labelMap, labelNode.getLabeledStatement());
                }
                break;
            case FileID:
            case BlockID:
            case MXMLEventSpecifierID:
View Full Code Here


            return false;
        IASNode loopNodeGrandParent = loopNodeParent.getParent();
        if (!(loopNodeGrandParent instanceof LabeledStatementNode))
            return false;
       
        LabeledStatementNode labeledStatementNode = (LabeledStatementNode)loopNodeGrandParent;
        String labeledStatementNodeLabel = labeledStatementNode.getLabel();
        if (labeledStatementNodeLabel == null)
            return false;
        return labeledStatementNodeLabel.equals(label);
    }
View Full Code Here

    //----------------------------------

    @Test
    public void testVisitLabel_1()
    {
        LabeledStatementNode node = (LabeledStatementNode) getNode(
                "foo: for each(var i:int in obj) { break foo; }",
                LabeledStatementNode.class);
        asBlockWalker.visitLabeledStatement(node);
        assertOut("foo : for each (var i:int in obj) {\n\tbreak foo;\n}");
    }
View Full Code Here

        // ([unknown]) LabelStatement messes up in finally{} block, something is wrong there
       
        // (erikdebruin) I don't see a finally block in the test code and the
        //               test passes... What's wrong?
       
        LabeledStatementNode node = (LabeledStatementNode) getNode(
                "foo: for each(var i:int in obj) break foo;",
                LabeledStatementNode.class);
        asBlockWalker.visitLabeledStatement(node);
        assertOut("foo : for each (var i:int in obj)\n\tbreak foo;");
    }
View Full Code Here

    @Override
    @Test
    public void testVisitLabel_1()
    {
        LabeledStatementNode node = (LabeledStatementNode) getNode(
                "foo: for each(var i:int in obj) { break foo; }",
                LabeledStatementNode.class);
        asBlockWalker.visitLabeledStatement(node);
        assertOut("foo : goog.array.forEach(obj, function (i) {\n\tbreak foo;\n})");
    }
View Full Code Here

    @Override
    @Test
    public void testVisitLabel_1a()
    {
        LabeledStatementNode node = (LabeledStatementNode) getNode(
                "foo: for each(var i:int in obj) break foo;",
                LabeledStatementNode.class);
        asBlockWalker.visitLabeledStatement(node);
        assertOut("foo : goog.array.forEach(obj, function (i) {\n\tbreak foo;\n})");
    }
View Full Code Here

    @Override
    @Test
    public void testVisitLabel_1()
    {
        LabeledStatementNode node = (LabeledStatementNode) getNode(
                "foo: for each(var i:int in obj) { break foo; }",
                LabeledStatementNode.class);
        asBlockWalker.visitLabeledStatement(node);
        assertOut("foo : for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n{\n  break foo;\n}}\n");
    }
View Full Code Here

    @Override
    @Test
    public void testVisitLabel_1a()
    {
        // TODO (mschmalle) LabelStatement messes up in finally{} block, something is wrong there
        LabeledStatementNode node = (LabeledStatementNode) getNode(
                "foo: for each(var i:int in obj) break foo;",
                LabeledStatementNode.class);
        asBlockWalker.visitLabeledStatement(node);
        assertOut("foo : for (var foreachiter0 in obj) \n{\nvar i = obj[foreachiter0];\n\n  break foo;}\n");
    }
View Full Code Here

    @Override
    @Test
    public void testVisitLabel_1()
    {
        LabeledStatementNode node = (LabeledStatementNode) getNode(
                "foo: for each(var i:int in obj) { break foo; }",
                LabeledStatementNode.class);
        visitor.visitLabeledStatement(node);
        assertOut("foo : for each (var /** @type {number} */ i in obj) {\n\tbreak foo;\n}");
    }
View Full Code Here

    @Override
    @Test
    public void testVisitLabel_1a()
    {
        // TODO LabelStatement messes up in finally{} block, something is wrong there
        LabeledStatementNode node = (LabeledStatementNode) getNode(
                "foo: for each(var i:int in obj) break foo;",
                LabeledStatementNode.class);
        visitor.visitLabeledStatement(node);
        assertOut("foo : for each (var /** @type {number} */ i in obj)\n\tbreak foo;");
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.tree.as.LabeledStatementNode

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.