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

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


        {
            InlineFunctionLexicalScope inlineFunctionScope = currentScope.pushInlineFunctionFrame(functionDef.getContainingScope(), isQualified, functionNode);
            currentScope = inlineFunctionScope;

            // generate the instructions for the body of the function
            IScopedNode body = functionNode.getScopedNode();
            InstructionList insns = inlineFunctionScope.getGenerator().generateInstructions(body, CmcEmitter.__statement_NT, inlineFunctionScope);

            currentScope = currentScope.popFrame();

            final ICompilerProject project = currentScope.getProject();
View Full Code Here


    }

    @Override
    public VariableClassification getVariableClassification()
    {
        IScopedNode scopedNode = getScopeNode();
        IASNode node = scopedNode;
       
        if (node != null)
        {
            if (node instanceof ICommonClassNode || node.getParent() instanceof ICommonClassNode)
View Full Code Here

       
        // make a dependency on the sdk class DeferredInstanceFromFunction
        IWorkspace workspace = project.getWorkspace();
        IResolvedQualifiersReference ref = ReferenceFactory.packageQualifiedReference(workspace, deferredInstanceFromFunctionClass);
      
        IScopedNode scopedNode = anInstanceNode.getContainingScope();
        IASScope iscope = scopedNode.getScope();
        ASScope scope = (ASScope)iscope;
       
        if (ref == null)
            assert false;
        IDefinition def = ref.resolve(project, scope, DependencyType.EXPRESSION, false);
View Full Code Here

    //
   
    @Override
    public VariableClassification getVariableClassification()
    {
        IScopedNode scopedNode = getScopeNode();
       
        IASNode node = scopedNode;
       
        if (node instanceof ICommonClassNode || node.getParent() instanceof ICommonClassNode)
            return VariableClassification.CLASS_MEMBER;
View Full Code Here

        // but which are not within other scoped nodes.
        collectImportNodes(importNodes);
       
        // Recurse up the chain of scoped nodes to collect import nodes
        // from higher scopes.
        IScopedNode parent = (IScopedNode)getAncestorOfType(IScopedNode.class);
        // if parent is package node, don't fetch imports from the file node
        // as file scope imports are not applicable in this scope
        if (parent != null )
        {
            if( !(getParent() instanceof PackageNode) )
                parent.getAllImportNodes(importNodes);
            // If we're a package, then just grab the implicit imports from the FileNode
            else if (parent instanceof FileNode )
                ((FileNode)parent).collectImplicitImportNodes(importNodes);
        }
    }
View Full Code Here

        // An "unbound" metadata will have "null" scope because it doesn't
        // have a bound definition.
        if (scope == null)
            return;
       
        final IScopedNode scopeNode = scope.getScopeNode();

        if (scopeNode != null &&
            scopeNode.getParent() != null &&
            scopeNode.getParent().equals(getDecoratedDefinition()))
        {
            super.analyze(set, scope, problems);
        }
    }
View Full Code Here

        // these members should be initialized from the containing scope, as they'll be merged back
        // if the inline is successful
        this.containingClassBinding = storeClassBinding ? allocateTemp() : null;

        IScopedNode body = functionNode.getScopedNode();
        FunctionDefinition functionDefinition = (FunctionDefinition)functionNode.getDefinition();

        setInitialControlFlowRegionNode(body);
        setLocalASScope(functionDefinition.getContainedScope());
        resetDebugInfo();
View Full Code Here

    }
   
    @Override
    public FunctionClassification getFunctionClassification()
    {
        IScopedNode scopedNode = getScopeNode();
        IASNode node = scopedNode;
       
        if (node instanceof ICommonClassNode || node.getParent() instanceof ICommonClassNode)
            return FunctionClassification.CLASS_MEMBER;
       
View Full Code Here

        {
            IASNode child = getChild(i);
           
            if (child instanceof IPackageNode)
            {
                IScopedNode packageBodyNode = ((IPackageNode)child).getScopedNode();

                // Check children of the package body node that might be definition nodes.
                int m = packageBodyNode.getChildCount();
                for (int j = 0; j < m; j++)
                {
                    IASNode packageBodyChild = packageBodyNode.getChild(j);
                    addIfDefinitionNode(packageBodyChild, includeNonPublicDefinitions, list);
                }
            }
            else if (includeDefinitionsOutsideOfPackage)
            {
View Full Code Here

    }

    private static void saveScope(IMXMLNode node, BindingDatabase bindingDataBase)
    {
        // Later (for code gen), we will need a scope, so let's save it here.
        IScopedNode scopedNode = node.getContainingScope();
        IASScope iscope = scopedNode.getScope();
        ASScope scope = (ASScope)iscope;
        bindingDataBase.setScope(scope);
    }
View Full Code Here

TOP

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

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.