You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/11/21 13:10:27 UTC

[07/17] git commit: [flex-falcon] [refs/heads/develop] - Override method to allow 'var' instead of 'const' while waiting for full ES6 support

Override method to allow 'var' instead of 'const' while waiting for full ES6 support

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/68206bcf
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/68206bcf
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/68206bcf

Branch: refs/heads/develop
Commit: 68206bcf65fcf9bdc92a882011e6747ffc2857c0
Parents: 6ff35ec
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Nov 21 11:47:17 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Nov 21 11:47:17 2014 +0100

----------------------------------------------------------------------
 .../internal/codegen/js/vf2js/JSVF2JSEmitter.java      | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/68206bcf/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java
index 5d182b9..f6276d3 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java
@@ -372,6 +372,19 @@ public class JSVF2JSEmitter extends JSGoogEmitter implements IJSVF2JSEmitter
     }
 
     @Override
+    protected void emitMemberKeyword(IDefinitionNode node)
+    {
+        if (node instanceof IFunctionNode)
+        {
+            writeToken(ASEmitterTokens.FUNCTION);
+        }
+        else if (node instanceof IVariableNode)
+        {
+            writeToken(ASEmitterTokens.VAR);
+        }
+    }
+
+    @Override
     public void emitField(IVariableNode node)
     {
         IDefinition definition = getClassDefinition(node);