flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [36/51] [partial] git commit: [flex-falcon] [refs/heads/feature/maven-migration-test] - - Check-In of the migrated project to make error analysis easier
Date Wed, 13 Apr 2016 18:56:28 GMT
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c3dce49f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
new file mode 100644
index 0000000..83ec265
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLBlockWalker.java
@@ -0,0 +1,436 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.mxml;
+
+import java.util.List;
+
+import org.apache.flex.compiler.codegen.as.IASEmitter;
+import org.apache.flex.compiler.codegen.mxml.IMXMLEmitter;
+import org.apache.flex.compiler.problems.ICompilerProblem;
+import org.apache.flex.compiler.projects.IASProject;
+import org.apache.flex.compiler.tree.as.IASNode;
+import org.apache.flex.compiler.tree.as.IFileNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLArrayNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLBindingNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLBooleanNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLClassDefinitionNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLComponentNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLDataBindingNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLDeclarationsNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLDeferredInstanceNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLDocumentNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLEmbedNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLEventSpecifierNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLFactoryNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLImplementsNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLInstanceNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLIntNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLLiteralNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLMetadataNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLNumberNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLObjectNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLPropertySpecifierNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLScriptNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLStringNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLStyleNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLStyleSpecifierNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLUintNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLVectorNode;
+import org.apache.flex.compiler.units.ICompilationUnit;
+import org.apache.flex.compiler.visitor.IASNodeStrategy;
+import org.apache.flex.compiler.visitor.IBlockWalker;
+import org.apache.flex.compiler.visitor.mxml.IMXMLBlockVisitor;
+import org.apache.flex.compiler.visitor.mxml.IMXMLBlockWalker;
+
+/**
+ * @author Michael Schmalle
+ * @author Erik de Bruin
+ */
+public class MXMLBlockWalker implements IMXMLBlockVisitor, IMXMLBlockWalker
+{
+
+    //----------------------------------
+    // emitter
+    //----------------------------------
+
+    private IASEmitter asEmitter;
+
+    @Override
+    public IASEmitter getASEmitter()
+    {
+        return asEmitter;
+    }
+
+    private IMXMLEmitter mxmlEmitter;
+
+    @Override
+    public IMXMLEmitter getMXMLEmitter()
+    {
+        return mxmlEmitter;
+    }
+
+    //----------------------------------
+    // errors
+    //----------------------------------
+
+    protected List<ICompilerProblem> errors;
+
+    List<ICompilerProblem> getErrors()
+    {
+        return errors;
+    }
+
+    //----------------------------------
+    // project
+    //----------------------------------
+
+    protected IASProject project;
+
+    public IASProject getProject()
+    {
+        return project;
+    }
+
+    //----------------------------------
+    // strategy
+    //----------------------------------
+
+    private IASNodeStrategy mxmlStrategy;
+
+    public IASNodeStrategy getMXMLStrategy()
+    {
+        return mxmlStrategy;
+    }
+
+    public void setMXMLStrategy(IASNodeStrategy value)
+    {
+        mxmlStrategy = value;
+    }
+
+    private IASNodeStrategy asStrategy;
+
+    public IASNodeStrategy getASStrategy()
+    {
+        return asStrategy;
+    }
+
+    public void setASStrategy(IASNodeStrategy value)
+    {
+        asStrategy = value;
+    }
+
+    //----------------------------------
+    // walk
+    //----------------------------------
+
+    @Override
+    public void walk(IASNode node)
+    {
+        if (node instanceof IMXMLNode)
+            mxmlStrategy.handle(node);
+        else
+            asStrategy.handle(node);
+    }
+
+    @Override
+    public void visitCompilationUnit(ICompilationUnit unit)
+    {
+        debug("visitMXMLCompilationUnit()");
+        IFileNode node = null;
+        try
+        {
+            node = (IFileNode) unit.getSyntaxTreeRequest().get().getAST();
+        }
+        catch (InterruptedException e)
+        {
+            throw new RuntimeException(e);
+        }
+
+        walk(node);
+    }
+
+    public MXMLBlockWalker(List<ICompilerProblem> errors, IASProject project,
+            IMXMLEmitter mxmlEmitter, IASEmitter asEmitter,
+            IBlockWalker asBlockWalker)
+    {
+        this.asEmitter = asEmitter;
+        this.mxmlEmitter = mxmlEmitter;
+        this.project = project;
+        this.errors = errors;
+
+        asEmitter.setWalker(asBlockWalker);
+
+        mxmlEmitter.setMXMLWalker((IBlockWalker) this);
+    }
+
+    @Override
+    public void visitFile(IMXMLFileNode node)
+    {
+        debug("visitFile()");
+
+        walk(node.getDocumentNode());
+    }
+
+    @Override
+    public void visitDeclarations(IMXMLDeclarationsNode node)
+    {
+        debug("visitDeclarations()");
+
+        mxmlEmitter.emitDeclarations(node);
+    }
+
+    @Override
+    public void visitDocument(IMXMLDocumentNode node)
+    {
+        debug("visitDocument()");
+
+        IMXMLFileNode fnode = (IMXMLFileNode) node.getParent();
+        
+        mxmlEmitter.emitDocumentHeader(fnode);
+        visitClassDefinition(node);
+        mxmlEmitter.emitDocumentFooter(fnode);
+    }
+
+    @Override
+    public void visitClassDefinition(IMXMLClassDefinitionNode node)
+    {
+        debug("visitClassDefinition()");
+
+        mxmlEmitter.emitClass(node);
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void visitDeferredInstance(IMXMLDeferredInstanceNode node)
+    {
+        debug("visitdeferredInstance()");
+
+        walk(node.getChild(0));
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void visitEventSpecifier(IMXMLEventSpecifierNode node)
+    {
+        debug("visitEventSpecifier()");
+
+        mxmlEmitter.emitEventSpecifier(node);
+    }
+
+    @Override
+    public void visitInstance(IMXMLInstanceNode node)
+    {
+        debug("visitInstance()");
+
+        mxmlEmitter.emitInstance(node);
+    }
+
+    @Override
+    public void visitPropertySpecifier(IMXMLPropertySpecifierNode node)
+    {
+        debug("visitPropertySpecifier()");
+
+        mxmlEmitter.emitPropertySpecifier(node);
+    }
+
+    @Override
+    public void visitScript(IMXMLScriptNode node)
+    {
+        debug("visitScript()");
+
+        mxmlEmitter.emitScript(node);
+    }
+
+    @Override
+    public void visitStyleBlock(IMXMLStyleNode node)
+    {
+    	// don't do anything.  subclasses should.
+    }
+    
+    @Override
+    public void visitStyleSpecifier(IMXMLStyleSpecifierNode node)
+    {
+        debug("visitStyleSpecifier()");
+
+        mxmlEmitter.emitStyleSpecifier(node);
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void visitArray(IMXMLArrayNode node)
+    {
+        debug("visitArray()");
+
+        mxmlEmitter.emitArray(node);
+    }
+
+    @Override
+    public void visitBoolean(IMXMLBooleanNode node)
+    {
+        debug("visitBoolean()");
+
+        mxmlEmitter.emitBoolean(node);
+    }
+
+    @Override
+    public void visitInt(IMXMLIntNode node)
+    {
+        debug("visitInt()");
+
+        mxmlEmitter.emitInt(node);
+    }
+
+    @Override
+    public void visitNumber(IMXMLNumberNode node)
+    {
+        debug("visitNumber()");
+
+        mxmlEmitter.emitNumber(node);
+    }
+
+    @Override
+    public void visitString(IMXMLStringNode node)
+    {
+        debug("visitString()");
+
+        mxmlEmitter.emitString(node);
+    }
+
+    @Override
+    public void visitUint(IMXMLUintNode node)
+    {
+        debug("visitUint()");
+
+        mxmlEmitter.emitUint(node);
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void visitLiteral(IMXMLLiteralNode node)
+    {
+        debug("visitLiteral()");
+
+        mxmlEmitter.emitLiteral(node);
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void visitFactory(IMXMLFactoryNode node)
+    {
+        debug("visitFactory()");
+
+        mxmlEmitter.emitFactory(node);
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void visitComponent(IMXMLComponentNode node)
+    {
+        debug("visitComponent()");
+
+        mxmlEmitter.emitComponent(node);
+    }
+
+    //--------------------------------------------------------------------------
+    
+    @Override
+    public void visitMetadata(IMXMLMetadataNode node)
+    {
+        debug("visitMetadata()");
+        
+        mxmlEmitter.emitMetadata(node);
+    }
+    
+    //--------------------------------------------------------------------------
+    
+    @Override
+    public void visitEmbed(IMXMLEmbedNode node)
+    {
+        debug("visitEmbed()");
+        
+        mxmlEmitter.emitEmbed(node);
+    }
+    
+    //--------------------------------------------------------------------------
+    
+    @Override
+    public void visitImplements(IMXMLImplementsNode node)
+    {
+        debug("visitImplements()");
+        
+        mxmlEmitter.emitImplements(node);
+    }
+    
+    //--------------------------------------------------------------------------
+    
+    @Override
+    public void visitVector(IMXMLVectorNode node)
+    {
+        debug("visitVector()");
+        
+        mxmlEmitter.emitVector(node);
+    }
+    
+    //--------------------------------------------------------------------------
+    
+    @Override
+    public void visitDatabinding(IMXMLDataBindingNode node)
+    {
+        debug("visitDatabinding()");
+        
+        mxmlEmitter.emitDatabinding(node);
+    }
+    
+    //--------------------------------------------------------------------------
+    
+    @Override
+    public void visitBinding(IMXMLBindingNode node)
+    {
+        debug("visitBinding()");
+        
+        System.out.println("skipping fx:Binding in " + node.getSourcePath() + ". This node
should be encoded in the binding data.");
+    }
+    
+    //--------------------------------------------------------------------------
+    
+    @Override
+    public void visitObject(IMXMLObjectNode node)
+    {
+        debug("visitObject()");
+        
+        mxmlEmitter.emitObject(node);
+    }
+    
+    //--------------------------------------------------------------------------
+
+    protected void debug(String message)
+    {
+        //System.out.println(message);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c3dce49f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitter.java
new file mode 100644
index 0000000..bba7f23
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitter.java
@@ -0,0 +1,425 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.mxml;
+
+import java.io.FilterWriter;
+
+import org.apache.flex.compiler.codegen.mxml.IMXMLEmitter;
+import org.apache.flex.compiler.definitions.IClassDefinition;
+import org.apache.flex.compiler.internal.codegen.Emitter;
+import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
+import org.apache.flex.compiler.projects.ICompilerProject;
+import org.apache.flex.compiler.tree.as.IASNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLArrayNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLBooleanNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLClassDefinitionNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLClassNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLComponentNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLDataBindingNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLDeclarationsNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLDocumentNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLEmbedNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLEventSpecifierNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLFactoryNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLImplementsNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLInstanceNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLIntNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLLiteralNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLMetadataNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLNumberNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLObjectNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLPropertySpecifierNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLScriptNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLStringNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLStyleSpecifierNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLUintNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLVectorNode;
+import org.apache.flex.compiler.visitor.IBlockWalker;
+import org.apache.flex.compiler.visitor.mxml.IMXMLBlockWalker;
+
+/**
+ * The base implementation for an MXML emitter.
+ * 
+ * @author Erik de Bruin
+ */
+public class MXMLEmitter extends Emitter implements IMXMLEmitter
+{
+
+    @Override
+    public String postProcess(String output)
+    {
+        return output;
+    }
+
+    //--------------------------------------------------------------------------
+    //    walkers
+    //--------------------------------------------------------------------------
+
+    protected IMXMLBlockWalker walker;
+
+    @Override
+    public IBlockWalker getMXMLWalker()
+    {
+        return (IBlockWalker) walker;
+    }
+
+    @Override
+    public void setMXMLWalker(IBlockWalker value)
+    {
+        walker = (IMXMLBlockWalker) value;
+    }
+
+    public MXMLEmitter(FilterWriter out)
+    {
+        super(out);
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void emitDeclarations(IMXMLDeclarationsNode node)
+    {
+        // visit tags
+        final int len = node.getChildCount();
+        for (int i = 0; i < len; i++)
+        {
+            getMXMLWalker().walk(node.getChild(i));
+        }    
+    }
+    
+    @Override
+    public void emitDocumentHeader(IMXMLFileNode node)
+    {
+        IMXMLDocumentNode dnode = node.getDocumentNode();
+        
+        IClassDefinition cdef = dnode
+                .getClassReference((ICompilerProject) walker.getProject());
+
+        write("<" + cdef.getBaseName());
+
+        emitPropertySpecifiers(dnode.getPropertySpecifierNodes(), true);
+
+        writeNewline(">", true);
+    }
+
+    @Override
+    public void emitDocumentFooter(IMXMLFileNode node)
+    {
+        IMXMLDocumentNode dnode = node.getDocumentNode();
+        
+        IClassDefinition cdef = dnode
+                .getClassReference((ICompilerProject) walker.getProject());
+
+        writeNewline("", false);
+        write("</" + cdef.getBaseName() + ">");
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void emitClass(IMXMLClassDefinitionNode node)
+    {
+
+        // fx:declarations
+        IMXMLDeclarationsNode[] dnodes = node.getDeclarationsNodes();
+        if (dnodes != null)
+        {
+            for (IMXMLDeclarationsNode dnode : dnodes)
+            {
+                getMXMLWalker().walk(dnode);
+            }
+        }
+
+        // fx:script
+        IMXMLScriptNode[] snodes = node.getScriptNodes();
+        if (snodes != null)
+        {
+            for (IMXMLScriptNode snode : snodes)
+            {
+                getMXMLWalker().walk(snode);
+            }
+        }
+
+        // "regular" tags
+        emitPropertySpecifiers(node.getPropertySpecifierNodes(), false);
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void emitEventSpecifier(IMXMLEventSpecifierNode node)
+    {
+    }
+
+    @Override
+    public void emitInstance(IMXMLInstanceNode node)
+    {
+        IClassDefinition cdef = node
+                .getClassReference((ICompilerProject) getMXMLWalker()
+                        .getProject());
+
+        String cname = cdef.getBaseName();
+
+        write("<");
+        write(cname);
+        if (node.getID() != null && node.getID() != "")
+        {
+            write(ASEmitterTokens.SPACE);
+            write("id");
+            write(ASEmitterTokens.EQUAL);
+            write("\"");
+            write(node.getID());
+            write("\"");
+        }
+
+        IMXMLPropertySpecifierNode[] pnodes = node.getPropertySpecifierNodes();
+
+        // attributes
+        emitPropertySpecifiers(pnodes, true);
+
+        write(">");
+
+        // child nodes
+        emitPropertySpecifiers(pnodes, false);
+
+        write("<");
+        write("/");
+        write(cname);
+        write(">");
+    }
+
+    @Override
+    public void emitPropertySpecifier(IMXMLPropertySpecifierNode node)
+    {
+        if (!isMXMLContentNode(node)) // only for attributes
+        {
+            write(node.getName());
+            write(ASEmitterTokens.EQUAL);
+        }
+
+        getMXMLWalker().walk(node.getInstanceNode());
+    }
+
+    @Override
+    public void emitStyleSpecifier(IMXMLStyleSpecifierNode node)
+    {
+        if (!isMXMLContentNode(node)) // only for attributes
+        {
+            write(node.getName());
+            write(ASEmitterTokens.EQUAL);
+        }
+
+        getMXMLWalker().walk(node.getInstanceNode());
+    }
+
+    @Override
+    public void emitScript(IMXMLScriptNode node)
+    {
+        write("<script><![CDATA[");
+
+        int len = node.getChildCount();
+        if (len > 0)
+        {
+            writeNewline("", true);
+
+            for (int i = 0; i < len; i++)
+            {
+                getMXMLWalker().walk(node.getChild(i));
+
+                if (i == len - 1)
+                    indentPop();
+
+                writeNewline(ASEmitterTokens.SEMICOLON);
+            }
+        }
+
+        write("]]></script>");
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void emitObject(IMXMLObjectNode node)
+    {
+        final int len = node.getChildCount();
+        for (int i = 0; i < len; i++)
+        {
+            IASNode child = node.getChild(i);
+
+            getMXMLWalker().walk(child);
+
+            if (child instanceof IMXMLInstanceNode && i < len - 1)
+                writeNewline();
+        }
+    }
+
+    @Override
+    public void emitArray(IMXMLArrayNode node)
+    {
+        final int len = node.getChildCount();
+        for (int i = 0; i < len; i++)
+        {
+            IASNode child = node.getChild(i);
+
+            getMXMLWalker().walk(child);
+
+            if (child instanceof IMXMLInstanceNode && i < len - 1)
+                writeNewline();
+        }
+    }
+
+    @Override
+    public void emitBoolean(IMXMLBooleanNode node)
+    {
+        emitAttributeValue(node);
+    }
+
+    @Override
+    public void emitInt(IMXMLIntNode node)
+    {
+        emitAttributeValue(node);
+    }
+
+    @Override
+    public void emitNumber(IMXMLNumberNode node)
+    {
+        emitAttributeValue(node);
+    }
+
+    @Override
+    public void emitString(IMXMLStringNode node)
+    {
+        emitAttributeValue(node);
+    }
+
+    @Override
+    public void emitUint(IMXMLUintNode node)
+    {
+        emitAttributeValue(node);
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void emitLiteral(IMXMLLiteralNode node)
+    {
+        write(node.getValue().toString());
+    }
+
+    //--------------------------------------------------------------------------
+    //  Utils
+    //--------------------------------------------------------------------------
+
+    public void emitPropertySpecifiers(IMXMLPropertySpecifierNode[] nodes,
+            boolean emitAttributes)
+    {
+        if (nodes != null)
+        {
+            for (IMXMLPropertySpecifierNode cnode : nodes)
+            {
+                if (!isMXMLContentNode(cnode) && emitAttributes)
+                {
+                    write(ASEmitterTokens.SPACE);
+                    getMXMLWalker().walk(cnode);
+                }
+                else if (isMXMLContentNode(cnode) && !emitAttributes)
+                {
+                    getMXMLWalker().walk(cnode);
+                }
+            }
+        }
+    }
+
+    protected void emitAttributeValue(IASNode node)
+    {
+        IMXMLLiteralNode cnode = (IMXMLLiteralNode) node.getChild(0);
+
+        if (cnode.getValue() != null)
+        {
+            write("\"");
+
+            getMXMLWalker().walk((IASNode) cnode); // Literal
+
+            write("\"");
+        }
+    }
+
+    protected boolean isMXMLContentNode(IMXMLNode node)
+    {
+        return node.getName().equals("mxmlContentFactory")
+                || node.getName().equals("mxmlContent");
+    }
+
+    public void emitFactory(IMXMLFactoryNode node)
+    {
+        IASNode cnode = node.getChild(0);
+
+        write("\"");
+
+        if (cnode instanceof IMXMLClassNode)
+        {
+            write(((IMXMLClassNode)cnode).getValue(getMXMLWalker().getProject()).getQualifiedName());
+        }
+
+        write("\"");
+    }
+
+    public void emitComponent(IMXMLComponentNode node)
+    {
+        IASNode cnode = node.getChild(0);
+
+        write("<fx:Component>");
+
+        if (cnode instanceof IMXMLClassNode)
+        {
+            getMXMLWalker().walk((IASNode) cnode); // Literal
+        }
+
+        write("</fx:Component>");
+    }
+
+    public void emitMetadata(IMXMLMetadataNode node)
+    {
+        // ToDo (erikdebruin): implement metadata output
+    }
+
+    public void emitEmbed(IMXMLEmbedNode node)
+    {
+        // ToDo (erikdebruin): implement embed output
+    }
+    
+    public void emitImplements(IMXMLImplementsNode node)
+    {
+        // ToDo (erikdebruin): implement implements output
+    }
+    
+    public void emitVector(IMXMLVectorNode node)
+    {
+        // ToDo (erikdebruin): implement vector output
+    }
+    
+    public void emitDatabinding(IMXMLDataBindingNode node)
+    {
+    	// ToDo (erikdebruin): implement databinding output
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c3dce49f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitterTokens.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitterTokens.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitterTokens.java
new file mode 100644
index 0000000..3d8a4e9
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLEmitterTokens.java
@@ -0,0 +1,42 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.mxml;
+
+import org.apache.flex.compiler.codegen.IEmitterTokens;
+
+/**
+ * @author Erik de Bruin
+ */
+public enum MXMLEmitterTokens implements IEmitterTokens
+{
+    TAG_OPEN("<"), TAG_CLOSE(">");
+
+    private String token;
+
+    private MXMLEmitterTokens(String value)
+    {
+        token = value;
+    }
+
+    public String getToken()
+    {
+        return token;
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c3dce49f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLWriter.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLWriter.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLWriter.java
new file mode 100644
index 0000000..afb45fd
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/MXMLWriter.java
@@ -0,0 +1,84 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.mxml;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+
+import org.apache.flex.compiler.codegen.js.IJSEmitter;
+import org.apache.flex.compiler.codegen.mxml.IMXMLEmitter;
+import org.apache.flex.compiler.driver.js.IJSBackend;
+import org.apache.flex.compiler.internal.codegen.js.JSFilterWriter;
+import org.apache.flex.compiler.internal.codegen.js.JSSharedData;
+import org.apache.flex.compiler.internal.codegen.js.JSWriter;
+import org.apache.flex.compiler.problems.ICompilerProblem;
+import org.apache.flex.compiler.projects.IASProject;
+import org.apache.flex.compiler.units.ICompilationUnit;
+import org.apache.flex.compiler.visitor.as.IASBlockWalker;
+import org.apache.flex.compiler.visitor.mxml.IMXMLBlockWalker;
+
+public class MXMLWriter extends JSWriter
+{
+    /**
+     * Create a JSApplication writer.
+     * 
+     * @param application the JSApplication model to be encoded
+     * @param useCompression use ZLIB compression if true
+     */
+    public MXMLWriter(IASProject project, List<ICompilerProblem> problems,
+            ICompilationUnit compilationUnit, boolean enableDebug)
+    {
+        super(project, problems, compilationUnit, enableDebug);
+    }
+
+    @Override
+    public void writeTo(OutputStream out, File sourceMapOut)
+    {
+        IJSBackend backend = (IJSBackend) JSSharedData.backend;
+        JSFilterWriter writer = (JSFilterWriter) backend.createWriterBuffer(project);
+
+        IJSEmitter asEmitter = (IJSEmitter) backend.createEmitter(writer);
+        IASBlockWalker asBlockWalker = backend.createWalker(
+                project, problems, asEmitter);
+
+        IMXMLEmitter mxmlEmitter = backend.createMXMLEmitter(writer);
+        IMXMLBlockWalker mxmlBlockWalker = backend.createMXMLWalker(
+                project, problems, mxmlEmitter, asEmitter, asBlockWalker);
+
+        mxmlBlockWalker.visitCompilationUnit(compilationUnit);
+
+        try
+        {
+            out.write(mxmlEmitter.postProcess(writer.toString()).getBytes());
+        }
+        catch (IOException e)
+        {
+            e.printStackTrace();
+        }
+
+        if (sourceMapOut != null)
+        {
+            throw new UnsupportedOperationException("Source maps not supported for MXML files");
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c3dce49f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLDescriptorSpecifier.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLDescriptorSpecifier.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLDescriptorSpecifier.java
new file mode 100644
index 0000000..9eac5d5
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLDescriptorSpecifier.java
@@ -0,0 +1,317 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.mxml.flexjs;
+
+import java.util.ArrayList;
+
+import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
+
+/**
+ * @author Erik de Bruin
+ */
+public class MXMLDescriptorSpecifier extends MXMLNodeSpecifier
+{
+
+    //--------------------------------------------------------------------------
+    //
+    //    Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public MXMLDescriptorSpecifier()
+    {
+        super();
+        
+        eventSpecifiers = new ArrayList<MXMLEventSpecifier>();
+        propertySpecifiers = new ArrayList<MXMLDescriptorSpecifier>();
+
+        valueNeedsQuotes = false;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //    Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //---------------------------------
+    //    children
+    //---------------------------------
+
+    public MXMLDescriptorSpecifier childrenSpecifier;
+
+    //---------------------------------
+    //    properties
+    //---------------------------------
+
+    public ArrayList<MXMLDescriptorSpecifier> propertySpecifiers;
+
+    //---------------------------------
+    //    events
+    //---------------------------------
+
+    public ArrayList<MXMLEventSpecifier> eventSpecifiers;
+
+    //---------------------------------
+    //    hasArray
+    //---------------------------------
+
+    public boolean hasArray;
+
+    //---------------------------------
+    //    hasObject
+    //---------------------------------
+
+    public boolean hasObject;
+
+    //---------------------------------
+    //    id
+    //---------------------------------
+
+    public String id;
+
+    //---------------------------------
+    //    isTopNode
+    //---------------------------------
+
+    public boolean isTopNode;
+
+    //---------------------------------
+    //    isProperty
+    //---------------------------------
+    
+    public boolean isProperty;
+    
+    //---------------------------------
+    //    parent
+    //---------------------------------
+
+    public MXMLDescriptorSpecifier parent;
+
+    //--------------------------------------------------------------------------
+    //
+    //    Methods
+    //
+    //--------------------------------------------------------------------------
+
+    //---------------------------------
+    //    outputEventSpecifier
+    //---------------------------------
+
+    private void outputEventSpecifier(boolean writeNewline)
+    {
+        // number of events
+        int count = 0;
+        for (MXMLEventSpecifier me : eventSpecifiers)
+        {
+            if (me.name != null)
+                count++;
+        }
+        write(count + "");
+        
+        for (MXMLEventSpecifier me : eventSpecifiers)
+        {
+            writeDelimiter(writeNewline);
+            write(me.output(writeNewline));
+        }
+    }
+
+    //---------------------------------
+    //    outputPropertySpecifier
+    //---------------------------------
+
+    private String outputPropertySpecifier(boolean writeNewline)
+    {
+        write((isProperty) ? ASEmitterTokens.SINGLE_QUOTE.getToken() : "");
+        write(name);
+        write((isProperty) ? ASEmitterTokens.SINGLE_QUOTE.getToken() : "");
+        writeDelimiter(writeNewline);
+
+        if (isProperty)
+        {
+            if (value != null)
+            {
+                write(ASEmitterTokens.TRUE);
+                writeDelimiter(writeNewline);
+                write(value);
+            }
+            else
+            {
+                write((hasArray) ? ASEmitterTokens.NULL : ASEmitterTokens.FALSE);
+                writeDelimiter(writeNewline && !hasArray);
+
+                write(ASEmitterTokens.SQUARE_OPEN);
+                output(false);
+                write(ASEmitterTokens.SQUARE_CLOSE);
+            }
+
+            if (parent != null)
+                writeDelimiter(writeNewline);
+        }
+        else
+        {
+            for (MXMLDescriptorSpecifier md : propertySpecifiers)
+            {
+                if (md.name != null && md.name.equals("mxmlContent"))
+                {
+                    childrenSpecifier = md;
+                    propertySpecifiers.remove(md);
+                    break;
+                }
+            }
+
+            if (id != null)
+            {
+                write(propertySpecifiers.size() + 1 + "");
+                writeDelimiter(writeNewline);
+                boolean isEffectiveID = id.startsWith(MXMLFlexJSEmitterTokens.ID_PREFIX.getToken())
||
+                						id.startsWith(MXMLFlexJSEmitterTokens.BINDING_PREFIX.getToken());
+                String idPropName = (isEffectiveID) ? "_id"
+                        : "id";
+                writeSimpleDescriptor(idPropName, ASEmitterTokens.TRUE.getToken(),
+                        ASEmitterTokens.SINGLE_QUOTE.getToken()
+                                + id + ASEmitterTokens.SINGLE_QUOTE.getToken(),
+                        writeNewline);
+    
+                writeDelimiter(writeNewline);
+            }
+            else
+            {
+                write(propertySpecifiers.size() + "");
+                writeDelimiter(writeNewline);
+            }
+            
+            output(writeNewline);
+        }
+
+        return sb.toString();
+    }
+
+    //---------------------------------
+    //    outputStyleSpecifier
+    //---------------------------------
+
+    private void outputStyleSpecifier(boolean writeNewline)
+    {
+        // TODO (erikdebruin) not yet implemented in FlexJS
+
+        write("0");
+        writeDelimiter(writeNewline);
+    }
+
+    //---------------------------------
+    //    output
+    //---------------------------------
+
+    @Override
+    public String output(boolean writeNewline)
+    {
+        if (isTopNode)
+        {
+            int count = 0;
+            for (MXMLDescriptorSpecifier md : propertySpecifiers)
+            {
+                if (md.name != null)
+                    count++;
+            }
+
+            write(count + "");
+            writeNewline(ASEmitterTokens.COMMA);
+        }
+        
+        MXMLDescriptorSpecifier model = null; // model goes first
+        MXMLDescriptorSpecifier beads = null; // beads go last
+
+        for (MXMLDescriptorSpecifier md : propertySpecifiers)
+        {
+            if (md.name != null && md.name.equals("model"))
+            {
+                model = md;
+
+                break;
+            }
+        }
+
+        if (model != null)
+            write(model.outputPropertySpecifier(true));
+
+        for (MXMLDescriptorSpecifier md : propertySpecifiers)
+        {
+            if (md.name != null)
+            {
+                if (!md.name.equals("model") && !md.name.equals("beads"))
+                    write(md.outputPropertySpecifier(writeNewline));
+                else if (md.name.equals("beads"))
+                    beads = md;
+            }
+        }
+
+        if (beads != null)
+            write(beads.outputPropertySpecifier(writeNewline));
+
+        if (!isProperty)
+        {
+            outputStyleSpecifier(writeNewline);
+
+            // TODO (erikdebruin) not yet implemented in FlexJS
+            //outputEffectSpecifier(writeNewline);
+
+            outputEventSpecifier(writeNewline);
+            
+            if (!isTopNode)
+            {
+                writeDelimiter(writeNewline);
+                
+                if (childrenSpecifier == null)
+                    write(ASEmitterTokens.NULL);
+                else
+                    outputChildren(childrenSpecifier, writeNewline);
+            }
+            
+            boolean isLastChild = parent != null
+                    && parent.propertySpecifiers.indexOf(this) == parent.propertySpecifiers
+                            .size() - 1;
+
+            if (!isLastChild && !isTopNode)
+                writeDelimiter(writeNewline);
+        }
+
+        return sb.toString();
+    }
+    
+    private void outputChildren(MXMLDescriptorSpecifier children, boolean writeNewline)
+    {
+        write(ASEmitterTokens.SQUARE_OPEN.getToken());
+        write(children.output(false));
+        write(ASEmitterTokens.SQUARE_CLOSE.getToken());
+    }
+
+    public String outputStateDescriptors()
+    {
+        for (MXMLDescriptorSpecifier md : propertySpecifiers)
+        {
+            write(ASEmitterTokens.SQUARE_OPEN);
+            write(md.output(false));
+            write(ASEmitterTokens.SQUARE_CLOSE);
+            writeNewline(ASEmitterTokens.COMMA);
+        }
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c3dce49f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLEventSpecifier.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLEventSpecifier.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLEventSpecifier.java
new file mode 100644
index 0000000..d419df6
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLEventSpecifier.java
@@ -0,0 +1,99 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.mxml.flexjs;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
+
+/**
+ * @author Erik de Bruin
+ */
+public class MXMLEventSpecifier extends MXMLNodeSpecifier
+{
+
+    //--------------------------------------------------------------------------
+    //
+    //    Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public MXMLEventSpecifier()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //    Properties
+    //
+    //--------------------------------------------------------------------------
+
+    static List<String> nameMap = Arrays.asList(
+    		"rollOver",
+    		"rollOut",
+    		"mouseDown",
+    		"mouseMove",
+    		"mouseOver",
+    		"mouseOut",
+    		"mouseUp"
+    );
+    
+    //---------------------------------
+    //    eventHandler
+    //---------------------------------
+
+    public String eventHandler;
+
+    //---------------------------------
+    //    type
+    //---------------------------------
+
+    public String type;
+
+    //--------------------------------------------------------------------------
+    //
+    //    Methods
+    //
+    //--------------------------------------------------------------------------
+
+    //---------------------------------
+    //    output
+    //---------------------------------
+
+    public String output(boolean writeNewline)
+    {
+        String handler = ASEmitterTokens.THIS.getToken()
+                + ASEmitterTokens.MEMBER_ACCESS.getToken() + eventHandler;
+        if (nameMap.contains(name))
+        	name = name.toLowerCase();
+        writeSimpleDescriptor(name, null, handler, writeNewline);
+
+        return sb.toString();
+    }
+
+    public static String getJSEventName(String name)
+    {
+    	if (nameMap.contains(name))
+    		return name.toLowerCase();
+    	return name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c3dce49f/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
new file mode 100644
index 0000000..6d374b4
--- /dev/null
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSBlockWalker.java
@@ -0,0 +1,83 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.flex.compiler.internal.codegen.mxml.flexjs;
+
+import java.util.List;
+
+import org.apache.flex.compiler.codegen.as.IASEmitter;
+import org.apache.flex.compiler.codegen.mxml.IMXMLEmitter;
+import org.apache.flex.compiler.codegen.mxml.flexjs.IMXMLFlexJSEmitter;
+import org.apache.flex.compiler.internal.codegen.mxml.MXMLBlockWalker;
+import org.apache.flex.compiler.internal.css.codegen.CSSCompilationSession;
+import org.apache.flex.compiler.problems.ICompilerProblem;
+import org.apache.flex.compiler.projects.IASProject;
+import org.apache.flex.compiler.tree.mxml.IMXMLDocumentNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLFileNode;
+import org.apache.flex.compiler.tree.mxml.IMXMLStyleNode;
+import org.apache.flex.compiler.visitor.IBlockWalker;
+
+/**
+ * @author Michael Schmalle
+ * @author Erik de Bruin
+ */
+public class MXMLFlexJSBlockWalker extends MXMLBlockWalker
+{
+
+    private IMXMLEmitter mxmlEmitter;
+
+    public MXMLFlexJSBlockWalker(List<ICompilerProblem> errors,
+            IASProject project, IMXMLEmitter mxmlEmitter, IASEmitter asEmitter,
+            IBlockWalker asBlockWalker)
+    {
+        super(errors, project, mxmlEmitter, asEmitter, asBlockWalker);
+
+        this.mxmlEmitter = mxmlEmitter;
+    }
+
+    //--------------------------------------------------------------------------
+
+    @Override
+    public void visitFile(IMXMLFileNode node)
+    {
+        debug("visitFile()");
+
+        walk(node.getDocumentNode());
+    }
+
+    @Override
+    public void visitDocument(IMXMLDocumentNode node)
+    {
+        debug("visitDocument()");
+
+        ((IMXMLFlexJSEmitter) mxmlEmitter).emitDocument(node);
+    }
+
+    @Override
+    public void visitStyleBlock(IMXMLStyleNode node)
+    {
+        node.getCSSDocument(errors);
+                
+        final CSSCompilationSession session = node.getFileNode().getCSSCompilationSession();
+        if (session == null)
+            return;
+        
+    }
+
+}


Mime
View raw message