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

Examples of org.apache.flex.compiler.tree.as.IVariableNode


    @Override
    @Test
    public void testField_withTypeValue()
    {
        IVariableNode node = getField("var foo:int = 420;");
        asBlockWalker.visitVariable(node);
        assertOut("/**\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
    }
View Full Code Here


    }

    @Test
    public void testQName()
    {
        IVariableNode node = getVariable("var a:QName = new QName();");
        asBlockWalker.visitVariable(node);
        assertOut("var a:QName = new QName()");
    }
View Full Code Here

    }

    @Test
    public void testRangeError()
    {
        IVariableNode node = getVariable("var a:RangeError = new RangeError();");
        asBlockWalker.visitVariable(node);
        assertOut("var a:RangeError = new RangeError()");
    }
View Full Code Here

    }

    @Test
    public void testField_withTypeValue_Negative()
    {
        IVariableNode node = getField("var foo:int = -420;");
        asBlockWalker.visitVariable(node);
        assertOut("/**\n * @type {number}\n */\nFalconTest_A.prototype.foo = -420");
    }
View Full Code Here

    }

    @Test
    public void testReferenceError()
    {
        IVariableNode node = getVariable("var a:ReferenceError = new ReferenceError();");
        asBlockWalker.visitVariable(node);
        assertOut("var a:ReferenceError = new ReferenceError()");
    }
View Full Code Here

    @Override
    @Test
    public void testField_withNamespaceTypeValue()
    {
        IVariableNode node = getField("private var foo:int = 420;");
        asBlockWalker.visitVariable(node);
        assertOut("/**\n * @private\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
    }
View Full Code Here

    @Override
    @Test
    public void testField_withCustomNamespaceTypeValue()
    {
        IVariableNode node = getField("mx_internal var foo:int = 420;");
        asBlockWalker.visitVariable(node);
        // (erikdebruin) we ignore custom namespaces completely (are there side effects I'm missing?)
        assertOut("/**\n * @type {number}\n */\nFalconTest_A.prototype.foo = 420");
    }
View Full Code Here

    @Override
    @Test
    public void testField_withNamespaceTypeCollection()
    {
        IVariableNode node = getField("protected var foo:Vector.<Foo>;");
        asBlockWalker.visitVariable(node);
        assertOut("/**\n * @protected\n * @type {Vector.<Foo>}\n */\nFalconTest_A.prototype.foo");
    }
View Full Code Here

    }

    @Test
    public void testRegExp_Literal()
    {
        IVariableNode node = getVariable("var a:RegExp = /test-\\d/i;");
        asBlockWalker.visitVariable(node);
        assertOut("var a:RegExp = /test-\\d/i");
    }
View Full Code Here

    @Override
    @Test
    public void testField_withNamespaceTypeCollectionComplex()
    {
        IVariableNode node = getField("protected var foo:Vector.<Vector.<Vector.<Foo>>>;");
        asBlockWalker.visitVariable(node);
        assertOut("/**\n * @protected\n * @type {Vector.<Vector.<Vector.<Foo>>>}\n */\nFalconTest_A.prototype.foo");
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.tree.as.IVariableNode

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.