Examples of ASTNodeID


Examples of org.apache.flex.compiler.tree.ASTNodeID

    //

    @Override
    public ASTNodeID getNodeID()
    {
        ASTNodeID nodeID = ASTNodeID.VariableID;

        IDefinition varDef = this.getDefinition();
        if (varDef != null && varDef.isBindable())
        {
            // Bindable vars with a user-specified event class work the same as normal variables
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

                else if (!context.parentContext.makingSimpleArray)
                {                   
                    for (int i = 0; i < arrayNode.getChildCount(); i++)
                    {
                        final IASNode child = arrayNode.getChild(i);
                        ASTNodeID nodeID = child.getNodeID();
                        if (nodeID == ASTNodeID.MXMLArrayID || nodeID == ASTNodeID.MXMLInstanceID)
                        {
                            isSimple = false;
                            break;
                        }
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

     * @param labelMap Map to populate with found labels
     * @param node Node to search from.
     */
    private static void populateLabelMap(Multimap<String, LabeledStatementNode> labelMap, IASNode node)
    {
        ASTNodeID nodeID = node.getNodeID();
       
        switch (nodeID)
        {
            case IfStatementID:
                {
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

    //
   
    @Override
    public ASTNodeID getNodeID()
    {
        final ASTNodeID nodeID;
        if (getOperator() == OperatorType.DESCENDANT_ACCESS)
        {
            nodeID = ASTNodeID.Op_DescendantsID;
        }
        else if (rightOperandNode != null && rightOperandNode.hasParenthesis())
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

        }
    }
   
    private  void doAnalyze(IASNode node, AnalysisState state)
    {
        ASTNodeID id = node.getNodeID();
        switch(id)
        {
            case IdentifierID:
                analyzeIdentifierNode((IIdentifierNode)node, state);
                break;
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

        IASNode cnode = node.getChild(0);

        if (cnode.getNodeID() == ASTNodeID.MemberAccessExpressionID)
            cnode = cnode.getChild(0);

        ASTNodeID id = cnode.getNodeID();
        if (id != ASTNodeID.SuperID)
        {
            ICompilerProject project = null;
            IDefinition def = null;
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

                .getAncestorOfType(IClassNode.class);

        IDefinition nodeDef = ((IIdentifierNode) node).resolve(project);

        IASNode parentNode = node.getParent();
        ASTNodeID parentNodeId = parentNode.getNodeID();

        IASNode firstChild = parentNode.getChild(0);

        boolean identifierIsMemberAccess = parentNodeId == ASTNodeID.MemberAccessExpressionID;
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

            project = getWalker().getProject();

        IDefinition nodeDef = ((IIdentifierNode) node).resolve(project);

        IASNode parentNode = node.getParent();
        ASTNodeID parentNodeId = parentNode.getNodeID();

        boolean identifierIsAccessorFunction = nodeDef instanceof AccessorDefinition;
        boolean identifierIsPlainFunction = nodeDef instanceof FunctionDefinition
                && !identifierIsAccessorFunction;
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

    }

    @Override
    public void emitBinaryOperator(IBinaryOperatorNode node)
    {
        ASTNodeID id = node.getNodeID();
        if (id == ASTNodeID.Op_InID
                || id == ASTNodeID.Op_LogicalAndAssignID
                || id == ASTNodeID.Op_LogicalOrAssignID)
        {
            super.emitBinaryOperator(node);
        }
        else if (id == ASTNodeID.Op_IsID || id == ASTNodeID.Op_AsID)
        {
            emitIsAs(node.getLeftOperandNode(), node.getRightOperandNode(), id, false);
        }
        else if (id == ASTNodeID.Op_InstanceOfID)
        {
            getWalker().walk(node.getLeftOperandNode());

            write(ASEmitterTokens.SPACE);
            writeToken(ASEmitterTokens.INSTANCEOF);
           
            IDefinition dnode = (node.getRightOperandNode()).resolve(project);
            if (dnode != null)
                write(dnode.getQualifiedName());
            else
                getWalker().walk(node.getRightOperandNode());
        }
        else
        {
            IExpressionNode leftSide = node.getLeftOperandNode();

            IExpressionNode property = null;
            int leftSideChildCount = leftSide.getChildCount();
            if (leftSideChildCount > 0)
            {
                IASNode childNode = leftSide.getChild(leftSideChildCount - 1);
                if (childNode instanceof IExpressionNode)
                    property = (IExpressionNode) childNode;
                else
                    property = leftSide;
            }
            else
                property = leftSide;

            IDefinition def = null;
            if (property instanceof IIdentifierNode)
                def = ((IIdentifierNode) property).resolve(getWalker()
                        .getProject());

            boolean isSuper = false;
            if (leftSide.getNodeID() == ASTNodeID.MemberAccessExpressionID)
            {
                IASNode cnode = leftSide.getChild(0);
                ASTNodeID cId = cnode.getNodeID();

                isSuper = cId == ASTNodeID.SuperID;
            }

            String op = node.getOperator().getOperatorText();
View Full Code Here

Examples of org.apache.flex.compiler.tree.ASTNodeID

    @Override
    public void visitBlock(IBlockNode node)
    {
        debug("visitBlock()");
        ASTNodeID pnodeId = node.getParent().getNodeID();
        // (erikdebruin) 'goog' also needs access to the block header for
        //               accessor function blocks
        if (pnodeId == ASTNodeID.FunctionID || pnodeId == ASTNodeID.GetterID
                || pnodeId == ASTNodeID.SetterID)
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.