Examples of IdentifierNode


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

     */
    public boolean addConfigConstNode(ConfigConstNode node)
    {
        initConfigStructures();
        node.normalize(true);
        IdentifierNode configNamespaceNode = (IdentifierNode)node.getNamespaceNode();
        IDefinitionSet set = configScope.getASScope().getLocalDefinitionSetByName(configNamespaceNode.getName());
        if (set == null)
        {
            IIdentifierNode namespaceNode = (IdentifierNode)node.getNamespaceNode();
            ICompilerProblem problem = new UndefinedConfigNamespaceProblem(namespaceNode, namespaceNode.getName());
            addProblem(problem);
View Full Code Here

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

            // as in this case we need to do a getlocal0 as the class
            // hasn't been initialized yet
            boolean useLocal0 = false;
            if (node instanceof IdentifierNode)
            {
                IdentifierNode id = (IdentifierNode)node;
                IDefinition def = id.resolve(currentScope.getProject());
                if (SemanticUtils.isRefToClassBeingInited(id, def) && !currentScope.insideInlineFunction())
                    useLocal0 = true;
            }

            // TODO: use getslot when we can.
View Full Code Here

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

     @return an attractive cost if the child has a known namespace, i.e.,
     *    it's a compile-time constant qualifier.
     */
    int qualifierIsCompileTimeConstant(IASNode iNode)
    {
        IdentifierNode qualifier = (IdentifierNode)SemanticUtils.getNthChild(iNode, 0);
        IDefinition def = qualifier.resolve(currentScope.getProject());

        int result = def instanceof NamespaceDefinition ? 1 : Integer.MAX_VALUE;
        return result;
    }
View Full Code Here

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

        }
    }
   
    public InstructionList reduce_gotoStmt(IASNode iNode)
    {
        IdentifierNode labelIdentifierNode = (IdentifierNode)SemanticUtils.getNthChild(iNode, 0);
        String target = labelIdentifierNode.getName();
        try
        {
            ControlFlowContextManager.ControlFlowContextSearchCriteria criterion = getGotoCriteria(target);
            return getNonLocalControlFlow(criterion);
        }
View Full Code Here

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

        return reduce_namespaceAsName_to_multinameL(iNode, false);
    }

    public Name reduce_namespaceAsName_to_multinameL(IASNode iNode, final boolean is_attribute)
    {
        IdentifierNode qualifier = (IdentifierNode)iNode;
        NamespaceDefinition ns = (NamespaceDefinition) qualifier.resolve(currentScope.getProject());

        int name_kind = is_attribute? CONSTANT_MultinameLA: CONSTANT_MultinameL;
        return new Name(name_kind, new Nsset( ns.resolveAETNamespace(currentScope.getProject())), null);
    }
View Full Code Here

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

    }

    public Binding reduce_simpleName(IASNode iNode)
    {
        final Binding result;
        final IdentifierNode identifier = (IdentifierNode)iNode;
        if (identifier.getName().equals(IASLanguageConstants.ANY_TYPE) && SemanticUtils.isE4XWildcardProperty(identifier))
        {
            // TODO: This is a specific fix for CMP-1731. CMP-696 should be able
            // to cover this use case in a more generic and robust way. Revisit
            // this implementation when CMP-696 is fixed.
            final ICompilerProject project = currentScope.getProject();
            final Nsset qualifiers = SemanticUtils.getOpenNamespaces(iNode, project);
            final Name name = new Name(CONSTANT_Multiname, qualifiers, null);
            result = new Binding(iNode, name, identifier.resolve(project));
        }
        else
        {
            result = currentScope.resolveName(identifier);
            currentScope.getMethodBodySemanticChecker().checkSimpleName(iNode, result);
View Full Code Here

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

                        ast.getAllImportNodes(importNodes);
                        if (baseNode == null)
                        {
                            // bindable class extends Object, must switch to
                            // extend EventDispatcher
                            IdentifierNode baseClassNode = new IdentifierNode("EventDispatcher");
                            baseClassNode.setParent(classNode);
                            classNode.setBaseClass(baseClassNode);
                            IdentifierNode flash = new IdentifierNode("flash");
                            IdentifierNode events = new IdentifierNode("events");
                            FullNameNode flashDotEvents = new FullNameNode(flash,
                                    new ASToken(ASToken.TOKEN_OPERATOR_MEMBER_ACCESS, 0, 0, 0, 0, "."), events);
                            FullNameNode fullNameNode = new FullNameNode(flashDotEvents,
                                    new ASToken(ASToken.TOKEN_OPERATOR_MEMBER_ACCESS, 0, 0, 0, 0, "."),
                                    baseClassNode);
View Full Code Here

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

    }

    public IDefinitionNode[] getDefinitions()
    {
        IDefinitionNode[] retVal = new IDefinitionNode[4];
        VariableNode thisNode = new VariableNode(new IdentifierNode(IASKeywordConstants.THIS));
        thisNode.setType(null, new IdentifierNode(IASLanguageConstants.Vector));
        retVal[0] = thisNode;

        //and super
        VariableNode superNode = new VariableNode(new IdentifierNode(IASKeywordConstants.SUPER));
        superNode.setType(null, new IdentifierNode(IASLanguageConstants.Object));
        retVal[1] = superNode;

        //add the fixed getter/setter pair
        GetterNode fixGetter = new GetterNode(null, null, new IdentifierNode("fixed"));
        NamespaceIdentifierNode pub = new NamespaceIdentifierNode(INamespaceConstants.public_);
        pub.span(-1, -1, -1, -1);
        fixGetter.setNamespace(pub);
        fixGetter.setType(null, new IdentifierNode(IASLanguageConstants.Boolean));
        retVal[2] = fixGetter;

        SetterNode fixSetter = new SetterNode(null, null, new IdentifierNode("fixed"));
        pub = new NamespaceIdentifierNode(INamespaceConstants.public_);
        pub.span(-1, -1, -1, -1);
        fixSetter.setNamespace(pub);
        fixSetter.setType(null, new IdentifierNode(IASLanguageConstants.void_));
        ParameterNode value = new ParameterNode(new IdentifierNode("value"));
        value.setType(null, new IdentifierNode(IASLanguageConstants.Boolean));
        fixSetter.getParametersContainerNode().addChild(value);
        retVal[3] = fixSetter;

        return retVal;
    }
View Full Code Here

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

     */
    public ExpressionNodeBase toExpression()
    {
        if (elementType instanceof AppliedVectorDefinition)
        {
            return new TypedExpressionNode(new IdentifierNode(IASLanguageConstants.Vector), ((AppliedVectorDefinition)elementType).toExpression());
        }
        return new IdentifierNode(elementType.getBaseName());
    }
View Full Code Here

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

     */
    public TypedExpressionNode toTypedExpression()
    {
        if (elementType instanceof AppliedVectorDefinition)
        {
            return new TypedExpressionNode(new IdentifierNode(IASLanguageConstants.Vector), ((AppliedVectorDefinition)elementType).toTypedExpression());
        }
        return new TypedExpressionNode(new IdentifierNode(IASLanguageConstants.Vector), new IdentifierNode(elementType.getBaseName()));
    }
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.