incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mschma...@apache.org
Subject svn commit: r1421615 [4/4] - in /incubator/flex/whiteboard/mschmalle/falconjx: ./ compiler.jx.tests/ compiler.jx.tests/src/ compiler.jx.tests/src/org/ compiler.jx.tests/src/org/apache/ compiler.jx.tests/src/org/apache/flex/ compiler.jx.tests/src/org/ap...
Date Thu, 13 Dec 2012 23:32:16 GMT
Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/visitor/JSWalker.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/visitor/JSWalker.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/visitor/JSWalker.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/visitor/JSWalker.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,132 @@
+/*
+ *
+ *  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.visitor;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import org.apache.flex.compiler.definitions.IAccessorDefinition;
+import org.apache.flex.compiler.definitions.IClassDefinition;
+import org.apache.flex.compiler.definitions.IConstantDefinition;
+import org.apache.flex.compiler.definitions.IFunctionDefinition;
+import org.apache.flex.compiler.definitions.IInterfaceDefinition;
+import org.apache.flex.compiler.definitions.INamespaceDefinition;
+import org.apache.flex.compiler.definitions.IPackageDefinition;
+import org.apache.flex.compiler.definitions.IVariableDefinition;
+import org.apache.flex.compiler.internal.units.SWCCompilationUnit;
+import org.apache.flex.compiler.projects.IASProject;
+import org.apache.flex.compiler.units.ICompilationUnit;
+import org.apache.flex.compiler.visitor.IASTVisitor;
+import org.apache.flex.compiler.visitor.IASWalker;
+
+/**
+ * @author Michael Schmalle
+ */
+public class JSWalker implements IASWalker
+{
+    private IASTVisitor visitor;
+
+    private IASProject project;
+
+    public JSWalker()
+    {
+    }
+
+    @Override
+    public void walkProject(IASProject element) throws IOException
+    {
+        this.project = element;
+
+        Collection<ICompilationUnit> units = project.getCompilationUnits();
+        for (ICompilationUnit unit : units)
+        {
+            System.out.println(unit.getDefinitionPromises().toString());
+            if (unit instanceof SWCCompilationUnit)
+                continue;
+            walkCompilationUnit(unit);
+        }
+
+        this.project = null;
+    }
+
+    @Override
+    public void walkCompilationUnit(ICompilationUnit element) throws IOException
+    {
+        visitor.visitCompilationUnit(element);
+
+    }
+
+    @Override
+    public void walkPackage(IPackageDefinition element)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void walkClass(IClassDefinition element)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void walkInterface(IInterfaceDefinition element)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void walkNamespace(INamespaceDefinition element)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void walkFunction(IFunctionDefinition element)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void walkAccessor(IAccessorDefinition definition)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void walkVariable(IVariableDefinition element)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void walkConstant(IConstantDefinition element)
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/internal/visitor/JSWalker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/targets/IJSTarget.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/targets/IJSTarget.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/targets/IJSTarget.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/targets/IJSTarget.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,41 @@
+/*
+ *
+ *  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.targets;
+
+import java.util.Collection;
+
+import org.apache.flex.compiler.problems.ICompilerProblem;
+import org.apache.flex.js.IJSApplication;
+
+/**
+ * @author Michael Schmalle
+ */
+public interface IJSTarget extends ITarget
+{
+
+    /**
+     * Build the target JavaScript application and collect problems. Every time
+     * the method is called, a new IJSApplication model is created.
+     * 
+     * @param problems compilation problems output
+     * @return IJSApplication if build is success
+     */
+    IJSApplication build(Collection<ICompilerProblem> problems);
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/targets/IJSTarget.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASNodeStrategy.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASNodeStrategy.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASNodeStrategy.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASNodeStrategy.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,38 @@
+/*
+ *
+ *  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.visitor;
+
+import org.apache.flex.compiler.tree.as.IASNode;
+
+/**
+ * A simple strategy to allow composition of {@link IASNode} handling
+ * when walking the AST node tree.
+ * 
+ * @author Michael Schmalle
+ */
+public interface IASNodeStrategy
+{
+    /**
+     * The strategy will handle the specific {@link IASNode}.
+     * 
+     * @param node The {@link IASNode} to handle.
+     */
+    void handle(IASNode node);
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASNodeStrategy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASTVisitor.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASTVisitor.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASTVisitor.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASTVisitor.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,37 @@
+/*
+ *
+ *  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.visitor;
+
+import java.io.IOException;
+
+import org.apache.flex.compiler.tree.as.IPackageNode;
+import org.apache.flex.compiler.units.ICompilationUnit;
+
+/**
+ * @author Michael Schmalle
+ */
+public interface IASTVisitor
+{
+    void visitCompilationUnit(ICompilationUnit unit) throws IOException;
+    
+    void visitPackage(IPackageNode node) throws IOException;
+    
+    
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASTVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASWalker.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASWalker.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASWalker.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASWalker.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,85 @@
+/*
+ *
+ *  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.visitor;
+
+import java.io.IOException;
+
+import org.apache.flex.compiler.definitions.IAccessorDefinition;
+import org.apache.flex.compiler.definitions.IClassDefinition;
+import org.apache.flex.compiler.definitions.IConstantDefinition;
+import org.apache.flex.compiler.definitions.IFunctionDefinition;
+import org.apache.flex.compiler.definitions.IInterfaceDefinition;
+import org.apache.flex.compiler.definitions.INamespaceDefinition;
+import org.apache.flex.compiler.definitions.IPackageDefinition;
+import org.apache.flex.compiler.definitions.IVariableDefinition;
+import org.apache.flex.compiler.projects.IASProject;
+import org.apache.flex.compiler.units.ICompilationUnit;
+
+/**
+ * @author Michael Schmalle
+ */
+public interface IASWalker
+{
+    // --------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    // --------------------------------------------------------------------------
+
+    /**
+     * Walks an <code>IASProject</code> and recurses through all nodes in the
+     * AST tree.
+     * 
+     * @param element The <code>IASProject</code>.
+     * @throws IOException 
+     */
+    void walkProject(IASProject element) throws IOException;
+
+    /**
+     * Walks an <code>IASCompilationUnit</code> of the <code>IASProject</code>.
+     * 
+     * @param element The <code>IASCompilationUnit</code> of the
+     * <code>IASProject</code>.
+     * @throws IOException 
+     */
+    void walkCompilationUnit(ICompilationUnit element) throws IOException;
+
+    /**
+     * Walks an <code>IASPackage</code> of the <code>IASCompilationUnit</code>.
+     * 
+     * @param element The <code>IASPackage</code> of the
+     * <code>IASCompilationUnit</code>.
+     */
+    void walkPackage(IPackageDefinition element);
+
+    void walkClass(IClassDefinition element);
+
+    void walkInterface(IInterfaceDefinition element);
+
+    void walkNamespace(INamespaceDefinition element);
+
+    void walkFunction(IFunctionDefinition element);
+
+    void walkAccessor(IAccessorDefinition definition);
+
+    void walkVariable(IVariableDefinition element);
+    
+    void walkConstant(IConstantDefinition element);
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/compiler/visitor/IASWalker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IASBlockVisitor.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IASBlockVisitor.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IASBlockVisitor.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IASBlockVisitor.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,180 @@
+/*
+ *
+ *  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.js;
+
+import org.apache.flex.compiler.internal.tree.as.LabeledStatementNode;
+import org.apache.flex.compiler.internal.tree.as.NamespaceAccessExpressionNode;
+import org.apache.flex.compiler.tree.as.IBinaryOperatorNode;
+import org.apache.flex.compiler.tree.as.IBlockNode;
+import org.apache.flex.compiler.tree.as.ICatchNode;
+import org.apache.flex.compiler.tree.as.IClassNode;
+import org.apache.flex.compiler.tree.as.IConditionalNode;
+import org.apache.flex.compiler.tree.as.IContainerNode;
+import org.apache.flex.compiler.tree.as.IDefaultXMLNamespaceNode;
+import org.apache.flex.compiler.tree.as.IDynamicAccessNode;
+import org.apache.flex.compiler.tree.as.IEmbedNode;
+import org.apache.flex.compiler.tree.as.IExpressionNode;
+import org.apache.flex.compiler.tree.as.IFileNode;
+import org.apache.flex.compiler.tree.as.IForLoopNode;
+import org.apache.flex.compiler.tree.as.IFunctionCallNode;
+import org.apache.flex.compiler.tree.as.IFunctionNode;
+import org.apache.flex.compiler.tree.as.IGetterNode;
+import org.apache.flex.compiler.tree.as.IIdentifierNode;
+import org.apache.flex.compiler.tree.as.IIfNode;
+import org.apache.flex.compiler.tree.as.IInterfaceNode;
+import org.apache.flex.compiler.tree.as.IIterationFlowNode;
+import org.apache.flex.compiler.tree.as.IKeywordNode;
+import org.apache.flex.compiler.tree.as.ILanguageIdentifierNode;
+import org.apache.flex.compiler.tree.as.ILiteralNode;
+import org.apache.flex.compiler.tree.as.IMemberAccessExpressionNode;
+import org.apache.flex.compiler.tree.as.INamespaceNode;
+import org.apache.flex.compiler.tree.as.INumericLiteralNode;
+import org.apache.flex.compiler.tree.as.IObjectLiteralValuePairNode;
+import org.apache.flex.compiler.tree.as.IPackageNode;
+import org.apache.flex.compiler.tree.as.IParameterNode;
+import org.apache.flex.compiler.tree.as.IReturnNode;
+import org.apache.flex.compiler.tree.as.ISetterNode;
+import org.apache.flex.compiler.tree.as.ISwitchNode;
+import org.apache.flex.compiler.tree.as.ITerminalNode;
+import org.apache.flex.compiler.tree.as.ITernaryOperatorNode;
+import org.apache.flex.compiler.tree.as.IThrowNode;
+import org.apache.flex.compiler.tree.as.ITryNode;
+import org.apache.flex.compiler.tree.as.ITypedExpressionNode;
+import org.apache.flex.compiler.tree.as.IUnaryOperatorNode;
+import org.apache.flex.compiler.tree.as.IVariableNode;
+import org.apache.flex.compiler.tree.as.IWhileLoopNode;
+import org.apache.flex.compiler.tree.as.IWithNode;
+import org.apache.flex.compiler.tree.metadata.IMetaTagNode;
+import org.apache.flex.compiler.tree.metadata.IMetaTagsNode;
+import org.apache.flex.compiler.units.ICompilationUnit;
+
+/**
+ * @author Michael Schmalle
+ */
+public interface IASBlockVisitor
+{
+    void visitCompilationUnit(ICompilationUnit unit);
+
+    void visitPackage(IPackageNode element);
+
+    void visitFile(IFileNode node);
+
+    void visitClass(IClassNode node);
+
+    void visitInterface(IInterfaceNode node);
+
+    //--------------------------------------------------------------------------
+    
+    void visitLanguageIdentifierNode(ILanguageIdentifierNode node);
+    
+    // block var or field
+    void visitVariable(IVariableNode node);
+    
+    void visitIterationFlow(IIterationFlowNode node);
+    
+    // is a IVariableNode
+    void visitParameter(IParameterNode node);
+
+    void visitFunction(IFunctionNode node);
+
+    void visitGetter(IGetterNode node);
+
+    void visitSetter(ISetterNode node);
+
+    void visitNamespace(INamespaceNode node);
+    
+    void visitReturn(IReturnNode node);
+
+    //--------------------------------------------------------------------------
+
+    void visitBlock(IBlockNode node);
+
+    void visitContainer(IContainerNode node);
+
+    void visitFunctionCall(IFunctionCallNode node);
+
+    void visitForLoop(IForLoopNode node);
+
+    void visitIf(IIfNode node);
+    
+    void visitWhileLoop(IWhileLoopNode node);
+
+    void visitTry(ITryNode node);
+
+    void visitCatch(ICatchNode node);
+
+    //--------------------------------------------------------------------------
+
+    void visitKeyword(IKeywordNode node);
+
+    void visitIdentifier(IIdentifierNode node);
+
+    // this is a IBinaryOperatorNode goes before
+    void visitDynamicAccess(IDynamicAccessNode node);
+
+    void visitNumericLiteral(INumericLiteralNode node);
+
+    void visitLiteral(ILiteralNode node);
+
+    void visitConditional(IConditionalNode node);
+
+    void visitTerminal(ITerminalNode node);
+
+    void visitBinaryOperator(IBinaryOperatorNode node);
+
+    void visitUnaryOperator(IUnaryOperatorNode node);
+
+    void visitDefaultXMLNamespace(IDefaultXMLNamespaceNode node);
+
+    void visitTypedExpression(ITypedExpressionNode node);
+
+    //
+    void visitMetaTags(IMetaTagsNode node);
+
+    void visitMetaTag(IMetaTagNode node);
+
+    void visitEmbed(IEmbedNode node);
+
+    // last
+
+    void visitExpression(IExpressionNode node);
+    
+    // TODO Figure out if the indirection is useful
+    
+    void visitConstructor(IFunctionNode node);
+
+    void visitTernaryOperator(ITernaryOperatorNode node);
+
+    void visitMemberAccessExpression(IMemberAccessExpressionNode node);
+
+    void visitNamespaceAccessExpression(NamespaceAccessExpressionNode node);
+    
+    void visitIObjectLiteralValuePair(IObjectLiteralValuePairNode node);
+
+    void visitSwitch(ISwitchNode node);
+
+    void visitLabeledStatement(LabeledStatementNode node);
+
+    void visitWith(IWithNode node);
+
+    void visitThrow(IThrowNode node);
+    
+
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IASBlockVisitor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSApplication.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSApplication.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSApplication.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSApplication.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,32 @@
+/*
+ *
+ *  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.js;
+
+
+/**
+ * The JavaScript model interface used when implementing build targets that
+ * create javascript applications cross compiled from actionscript.
+ * 
+ * @author Michael Schmalle
+ */
+public interface IJSApplication
+{
+
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSApplication.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSDocEmitter.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSDocEmitter.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSDocEmitter.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSDocEmitter.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,124 @@
+/*
+ *
+ *  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.js;
+
+import org.apache.flex.compiler.definitions.IClassDefinition;
+import org.apache.flex.compiler.definitions.ITypeDefinition;
+import org.apache.flex.compiler.tree.as.IASNode;
+import org.apache.flex.compiler.tree.as.IClassNode;
+import org.apache.flex.compiler.tree.as.IFunctionNode;
+import org.apache.flex.compiler.tree.as.IParameterNode;
+import org.apache.flex.compiler.tree.as.IVariableNode;
+
+public interface IJSDocEmitter
+{
+    /*
+     * https://developers.google.com/closure/compiler/docs/js-for-compiler#types
+     *- @const - Marks a variable as read-only. The compiler can inline @const variables
+     *
+     *- @constructor - Marks a function as a constructor.
+     *
+     *- @define - Indicates a constant that can be overridden by the compiler at compile-time.
+     *
+     * @deprecated - Warns against using the marked function, method, or property should
not be used.
+     * 
+     *- @enum - Specifies the type of an enum. An enum is an object whose properties constitute
a 
+     *        set of related constants. The @enum tag must be followed by a type expression.

+     *        
+     * @expose - Declares an exposed property. Exposed properties will not be removed, or
renamed, 
+     *         or collapsed, or optimized in any way by the compiler.
+     *         
+     *- @extends - Marks a class or interface as inheriting from another class. A class marked

+     *           with @extends must also be marked with either @constructor or @interface.

+     *           
+     *- @implements - Used with @constructor to indicate that a class implements an interface.

+     *
+     *- @inheritDoc - tag implies the @override tag.  has exactly the same documentation.
+     *
+     * @interface - Marks a function as an interface.
+     * 
+     * @lends
+     * 
+     * @license|@preserve - Tells the compiler to insert the associated comment before the
compiled
+     *                      code for the marked file.
+     *                      
+     * @nosideeffects - Indicates that a call to the declared function has no side effects
+     * 
+     *- @override - Indicates that a method or property of a subclass intentionally hides
a method or 
+     *              property of the superclass.
+     *              
+     * @param - Used with method, function and constructor definitions to specify the types
of function 
+     *          arguments. 
+     *          
+     * @private - Marks a member as private. Only code in the same file can access global
variables and 
+     *            functions marked @private. Constructors marked @private can only be instantiated
by code 
+     *            in the same file and by their static and instance members. 
+     *            
+     * @protected - Indicates that a member or property is protected.
+     * 
+     * @return - Specifies the return types of method and function definitions. The @return
tag must be 
+     *           followed by a type expression. 
+     *           
+     * @this - Specifies the type of the object to which the keyword this refers within a
function. 
+     *         The @this tag must be followed by a type expression. 
+     *         
+     * @type - Identifies the type of a variable, property, or expression. The @type tag
must be 
+     *         followed by a type expression. 
+     *         
+     * @typedef - Declares an alias for a more complex type. 
+     */
+    
+    // @const
+    
+    
+    void emitConst(IVariableNode node);
+    
+    void emitConstructor(IFunctionNode node);
+    
+    void emitDefine(IVariableNode node);
+    
+    void emitDeprecated(IASNode node);
+    
+    void emitEnum(IClassNode node);
+    
+    void emitExtends(IClassDefinition superDefinition);
+    
+    void emitImplements(IClassNode node);
+    
+    void emitInheritDoc(IClassNode node);
+    
+    void emitLicense(IClassNode node);
+    
+    void emitOverride(IFunctionNode node);
+    
+    void emitParam(IParameterNode node);
+    
+    void emitPrivate(IASNode node);
+    
+    void emitProtected(IASNode node);
+    
+    void emitReturn(IFunctionNode node);
+    
+    void emitThis(ITypeDefinition node);
+    
+    void emitType(IASNode node);
+    
+    void emitTypedef(IASNode node);
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSDocEmitter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSWriter.java
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSWriter.java?rev=1421615&view=auto
==============================================================================
--- incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSWriter.java
(added)
+++ incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSWriter.java
Thu Dec 13 23:32:01 2012
@@ -0,0 +1,51 @@
+/*
+ *
+ *  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.js;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * A JavaScript writer that outputs cross compiled string data to the
+ * output stream.
+ * 
+ * @author Michael Schmalle
+ */
+public interface IJSWriter extends Closeable
+{
+    /**
+     * Start writing to output stream.
+     * 
+     * @param out output stream
+     */
+    void writeTo(OutputStream out);
+
+    /**
+     * Start writing to a file.
+     * 
+     * @param out The output {@link File}.
+     * @return The number of bytes written.
+     */
+    int writeTo(File out) throws FileNotFoundException, IOException;
+
+}

Propchange: incubator/flex/whiteboard/mschmalle/falconjx/compiler.jx/src/org/apache/flex/js/IJSWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message