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

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


   
    private String getSourceStringFromMemberAccessExpressionNode(MemberAccessExpressionNode node)
    {
        String s = "";
       
        IExpressionNode left = node.getLeftOperandNode();
        if (left instanceof FunctionCallNode) //  probably a cast
        {
            IASNode child = ((FunctionCallNode)left).getArgumentsNode().getChild(0);
            if (child instanceof IdentifierNode)
                s = getSourceStringFromIdentifierNode((IdentifierNode)child);
            else if (child instanceof MemberAccessExpressionNode)
                s = getSourceStringFromMemberAccessExpressionNode((MemberAccessExpressionNode)child);
        }
        else if (left instanceof MemberAccessExpressionNode)
            s = getSourceStringFromMemberAccessExpressionNode((MemberAccessExpressionNode)left);
        else if (left instanceof IdentifierNode)
            s = getSourceStringFromIdentifierNode((IdentifierNode)left);
        else
            System.out.println("expected binding member access left node" + node.toString());
        s += ".";
       
        IExpressionNode right = node.getRightOperandNode();
        if (right instanceof FunctionCallNode) //  probably a cast
        {
            IASNode child = ((FunctionCallNode)right).getArgumentsNode().getChild(0);
            if (child instanceof IdentifierNode)
                s += getSourceStringFromIdentifierNode((IdentifierNode)child);
View Full Code Here


    }
   
    private String getSourceStringFromGetter(List<IExpressionNode> nodes)
    {
        String s = "";
        IExpressionNode node = nodes.get(0);
        if (node instanceof MemberAccessExpressionNode)
        {
            s = getSourceStringFromMemberAccessExpressionNode((MemberAccessExpressionNode)node);
        }
        return s;
View Full Code Here

            Class<? extends IASNode> type)
    {
        String source = "package {public class A {function a():void {" + code
                + "}}";
        IFileNode node = getFileNode(source);
        IExpressionNode child = (IExpressionNode) findFirstDescendantOfType(
                node, type);
        return child;
    }
View Full Code Here

        writeToken(IASKeywordConstants.CLASS);
        write(SPACE);
        getWalker().walk(node.getNameExpressionNode());
        write(SPACE);

        IExpressionNode bnode = node.getBaseClassExpressionNode();
        if (bnode != null)
        {
            writeToken(IASKeywordConstants.EXTENDS);
            write(SPACE);
            getWalker().walk(bnode);
View Full Code Here

    public void emitParameter(IParameterNode node)
    {
        getWalker().walk(node.getNameExpressionNode());
        write(":");
        getWalker().walk(node.getVariableTypeNode());
        IExpressionNode anode = node.getAssignedValueNode();
        if (anode != null)
        {
            write(" = ");
            getWalker().walk(anode);
        }
View Full Code Here

    @Override
    public void emitReturn(IReturnNode node)
    {
        write("return");
        IExpressionNode rnode = node.getReturnValueNode();
        if (rnode != null && rnode.getNodeID() != ASTNodeID.NilID)
        {
            write(" ");
            getWalker().walk(rnode);
        }
    }
View Full Code Here

    private void walkArguments(IExpressionNode[] nodes)
    {
        int len = nodes.length;
        for (int i = 0; i < len; i++)
        {
            IExpressionNode node = nodes[i];
            getWalker().walk(node);
            if (i < len - 1)
                write(", ");
        }
    }
View Full Code Here

        String root = "";
        if (!node.isConst())
          root = "prototype.";
        write(definition.getQualifiedName() + "." + root + node.getName());
       
        IExpressionNode vnode = node.getAssignedValueNode();
        if (vnode != null)
        {
            write(" = ");
            getWalker().walk(vnode);
        }
View Full Code Here

        if (!(node instanceof ChainedVariableNode) && !node.isConst())
        {
            emitMemberKeyword(node);
        }

        IExpressionNode avnode = node.getAssignedValueNode();
     
        if (avnode != null)
        {
          String opCode = avnode.getNodeID().getParaphrase();
          if (opCode != "AnonymousFunction")
            getDoc().emitVarDoc(node);
        }
        else
        {
View Full Code Here

    private void emitSuperCallCodeBlock(IFunctionNode node)
    {
        IClassNode cnode = (IClassNode) node.getAncestorOfType(IClassNode.class);
     
        IExpressionNode bnode = cnode.getBaseClassExpressionNode();
        if (bnode != null && node.isConstructor())
        {
            if (!hasBody(node))
                write("\t");
           
View Full Code Here

TOP

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

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.