private static void transformCompilationUnit(final ScriptOrFnNode tree,
            final Node node,
            boolean createScopeObjects)
    {

        int offset = 0;
        int nodeType = node.getType();
        switch (nodeType) {

        case Token.NAME:
        {
            decompiler.addName(node.getString());
            break;
        }
        case Token.EOL:
        {
            //decompiler.addEOL();
            break;
        }
        case Token.NUMBER:
        {
            decompiler.addNumber(0);
            break;
        }
        case Token.REGEXP:
        {
            System.err.println("SKIPPING");
            break;
        }
        case Token.STRING:
        {
            decompiler.addString(node.getString());
            break;
        }
        case Token.FUNCTION:
        { 
            offset = decompiler.getCurrentOffset();
            decompiler.markFunctionStart(FunctionNode.FUNCTION_STATEMENT);


        }


        default: 
        {
            decompiler.addToken(nodeType);
        }
        }


        Node n = node.getFirstChild();
        while(n!=null)
        {
            transformCompilationUnit(tree, n, createScopeObjects);
            n = n.getNext();
        }

        if (node.getType()==Token.FUNCTION)
        {

            decompiler.markFunctionEnd(offset);
        }


    }