Examples of IFunctionDefinition


Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

            return;
        }

        FunctionNode fn = (FunctionNode) node;
        fn.parseFunctionBody(new ArrayList<ICompilerProblem>());
        IFunctionDefinition definition = node.getDefinition();

        String name = toPrivateName(definition);
        write(name);
        write(":");
        write(" function ");
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

    }

    @Override
    public void emitFunctionBlockHeader(IFunctionNode node)
    {
        IFunctionDefinition definition = node.getDefinition();

        if (node.isConstructor())
        {
            initializingFieldsInConstructor = true;
            IClassDefinition type = (IClassDefinition) definition
                    .getAncestorOfType(IClassDefinition.class);
            // emit public fields init values
            List<IVariableDefinition> fields = TempTools.getFields(type, true);
            for (IVariableDefinition field : fields)
            {
                if (TempTools.isVariableAParameter(field,
                        definition.getParameters()))
                    continue;
                write("this.");
                write(field.getBaseName());
                write(" = ");
                emitFieldInitialValue((IVariableNode) field.getNode());
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

        project = getWalker().getProject();

        IClassDefinition definition = node.getDefinition();

        IFunctionDefinition ctorDefinition = definition.getConstructor();

        // Static-only (Singleton) classes may not have a constructor
        if (ctorDefinition != null)
        {
            IFunctionNode ctorNode = (IFunctionNode) ctorDefinition.getNode();
            if (ctorNode != null)
            {
                // constructor
                emitMethod(ctorNode);
                write(ASEmitterTokens.SEMICOLON);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

    protected void emitObjectDefineProperty(IAccessorNode node)
    {
        FunctionNode fn = (FunctionNode) node;
        fn.parseFunctionBody(getProblems());

        IFunctionDefinition definition = node.getDefinition();
        ITypeDefinition type = (ITypeDefinition) definition.getParent();

        if (project == null)
            project = getWalker().getProject();

        getDoc().emitMethodDoc(fn, project);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

    @Override
    public void emitClass(IClassNode node)
    {
        IClassDefinition definition = node.getDefinition();

        IFunctionDefinition ctorDefinition = definition.getConstructor();

        // Static-only (Singleton) classes may not have a constructor
        if (ctorDefinition != null)
        {
            IFunctionNode ctorNode = (IFunctionNode) ctorDefinition.getNode();
            if (ctorNode != null)
            {
                // constructor
                emitMethod(ctorNode);
                write(ASEmitterTokens.SEMICOLON);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

        write(ASEmitterTokens.MEMBER_ACCESS);
        write(JSEmitterTokens.DEFINE_PROPERTY);
        writeNewline(ASEmitterTokens.PAREN_OPEN, true);

        // Type
        IFunctionDefinition definition = node.getDefinition();
        ITypeDefinition type = (ITypeDefinition) definition.getParent();
        write(type.getQualifiedName());
        if (!node.hasModifier(ASModifier.STATIC))
        {
            write(ASEmitterTokens.MEMBER_ACCESS);
            write(JSEmitterTokens.PROTOTYPE);
        }
        writeToken(ASEmitterTokens.COMMA);
        writeNewline();

        // name
        write(ASEmitterTokens.SINGLE_QUOTE);
        write(definition.getBaseName());
        write(ASEmitterTokens.SINGLE_QUOTE);
        writeToken(ASEmitterTokens.COMMA);
        writeNewline();

        // info object
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

        }

        FunctionNode fn = (FunctionNode) node;
        fn.parseFunctionBody(problems);

        IFunctionDefinition definition = node.getDefinition();

        emitNamespaceIdentifier(node);
        emitModifiers(definition);
        emitMemberKeyword(node);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

            return;
        }

        FunctionNode fn = (FunctionNode) node;
        fn.parseFunctionBody(new ArrayList<ICompilerProblem>());
        IFunctionDefinition definition = node.getDefinition();

        String name = toPrivateName(definition);
        write(name);
        write(":");
        write(" function ");
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

    }

    @Override
    public void emitFunctionBlockHeader(IFunctionNode node)
    {
        IFunctionDefinition definition = node.getDefinition();

        if (node.isConstructor())
        {
            initializingFieldsInConstructor = true;
            IClassDefinition type = (IClassDefinition) definition
                    .getAncestorOfType(IClassDefinition.class);
            // emit public fields init values
            List<IVariableDefinition> fields = TempTools.getFields(type, true);
            for (IVariableDefinition field : fields)
            {
                if (TempTools.isVariableAParameter(field,
                        definition.getParameters()))
                    continue;
                write("this.");
                write(field.getBaseName());
                write(" = ");
                emitFieldInitialValue((IVariableNode) field.getNode());
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IFunctionDefinition

    @Override
    public void emitClass(IClassNode node)
    {
        IClassDefinition definition = node.getDefinition();

        IFunctionDefinition ctorDefinition = definition.getConstructor();

        // Static-only (Singleton) classes may not have a constructor
        if (ctorDefinition != null)
        {
            IFunctionNode ctorNode = (IFunctionNode) ctorDefinition.getNode();
            if (ctorNode != null)
            {
                // constructor
                emitMethod(ctorNode);
                write(ASEmitterTokens.SEMICOLON);
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.