Package tree

Examples of tree.HaxeTree


        HaxeTree[] values = new HaxeTree[values().size()];
        values().toArray(values);
        int size = values.length;
        for (int i = size - 1; i >= 0; i--)
        {
            HaxeTree node = values[i];
            if (node instanceof Function)
            {
                return (Function)node;
            }
        }
View Full Code Here


     * @param data - current environment or parent class
     * @return
     */
    private HaxeTree getDeclaration(final Object data, final String text)
    {
        HaxeTree decl = null;
        if (data instanceof Environment)
        {
            Environment env = (Environment)data;
            decl = env.get(text);
        }
View Full Code Here

        {
            return result;
        }
        // 4. types declared in imported files
        // TODO: What means - "if the searched package is empty"?
        HaxeTree node = imports.get(shortTypeName);
        if (node != null)
        {
            for (HaxeTree child : node.getChildren())
            {
                if (child instanceof HaxeType &&
                        child.getText().equals(shortTypeName))
                {
                    return (HaxeType)child;
View Full Code Here

    }
   
    @Override
    protected void visit(Assignment node, Object data)
    {
        HaxeTree leftOperand = node.getLeftOperand();
        HaxeTree rightOperand = node.getRightOperand();
       
        visit(leftOperand, data);
        visit(rightOperand, data);
       
        if (leftOperand.isUndefinedType())
        {
            leftOperand.setHaxeType(rightOperand.getHaxeType());
        }
       
        node.setHaxeType(leftOperand.getHaxeType(true));
    }
View Full Code Here

        // expected already marked as Error nodes - so there
        // is no variant that function will be null
        Function function = TreeUtils.getParentFunction(node);
        node.setFunction(function);
       
        HaxeTree expression = node.getExpression();
        if (expression == null)
        {
            return;
        }
        visit(expression, declarations);
View Full Code Here

    @Override
    protected void visit(Binary node, Object data)
    {
        Environment declarations = (Environment)data;
        HaxeTree leftNode = node.getLeftOperand();
        HaxeTree rightNode = node.getRightOperand();
       
        visit(leftNode, declarations);
        visit(rightNode, declarations);
       
        HaxeType definedType = node.defineResultType();
View Full Code Here

        if (project == null)
        {
            return;
        }
        CodeFile file = project.getFile(longName);
        HaxeTree ast = null;
        if (file == null && projectManager.getHaxeLib() != null)
        {
            file = projectManager.getHaxeLib().getFile(longName);
        }
        if (file != null)
View Full Code Here

        }
    }
   
    protected void visitMemberUse(Usage node, Object data)
    {
        HaxeTree decl = null;
        if (data instanceof Class)
        {
            Class parent = (Class)data;
            decl = parent.getDeclaration(node.getText());
        }
        node.setDeclarationNode(decl);

        if (!node.isFieldUse() && !(
                decl instanceof Class ||
                decl instanceof Enum)) //+ interface ??
        {
            return;
        }
       
        HaxeTree child = node.getChild(0).getChild(0);
        // slices and methcalls
        if (child instanceof MethodCall ||
                child instanceof Slice)
        {
            visit(child, decl);
View Full Code Here

                continue;
            }
            visit(child, data);
        }
       
        HaxeTree object = node.getObjectWhichIsCreated();
        String name = object.getText();
        HaxeTree declaration = null;
        for (String pack : imports.keySet())
        {
            // imports like a.b.c
            if (pack.equals(name))
            {
              HaxeTree pDeclaration = imports.get(pack);
              if (!(pDeclaration instanceof Class))
              {
                // TODO and what to do?
                return;
              }
View Full Code Here

        if (node.isFieldUse())
        {
            visit(node.getChild(node.getChildCount() - 1), data);
        }
       
        HaxeTree declaration = null;
        List<HaxeTree> params = node.getParameters();
       
        for (HaxeTree param : params)
        {
            visit(param, data);
View Full Code Here

TOP

Related Classes of tree.HaxeTree

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.