flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [4/8] git commit: [flex-falcon] [refs/heads/develop] - fix binding expressions
Date Sat, 15 Nov 2014 06:28:26 GMT
fix binding expressions


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

Branch: refs/heads/develop
Commit: f6c099b64a36526d2e77f5545e0bc3442981aa9e
Parents: 7120b40
Author: Alex Harui <aharui@apache.org>
Authored: Fri Nov 14 07:58:10 2014 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Nov 14 07:58:10 2014 -0800

----------------------------------------------------------------------
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java   | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/f6c099b6/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 43d2af2..7c59b1d 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -463,9 +463,20 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
                 List<IExpressionNode> getterNodes = bi.getExpressionNodesForGetter();
                 StringBuilder sb = new StringBuilder();
                 sb.append("function() { return ");
-                for (IExpressionNode getterNode : getterNodes)
+                int n = getterNodes.size();
+                for (int i = 0; i < n; i++)
                 {
-                    sb.append(asEmitter.stringifyNode(getterNode));
+                	IExpressionNode getterNode = getterNodes.get(i);
+                	if (getterNode.getNodeID() == ASTNodeID.LiteralStringID)
+                	{
+                		sb.append(ASEmitterTokens.DOUBLE_QUOTE.getToken());
+                		sb.append(asEmitter.stringifyNode(getterNode));
+                		sb.append(ASEmitterTokens.DOUBLE_QUOTE.getToken());
+                	}
+                	else
+                		sb.append(asEmitter.stringifyNode(getterNode));
+                    if (i < n - 1)
+                    	sb.append(ASEmitterTokens.SPACE.getToken() + ASEmitterTokens.PLUS.getToken()
+ ASEmitterTokens.SPACE.getToken());
                 }
                 sb.append("; },");
                 writeNewline(sb.toString());
@@ -1439,7 +1450,9 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
     	else
     	{
             MXMLDescriptorSpecifier ps = getCurrentDescriptor("ps");
-            ps.value = "{";	
+            if (ps.value == null)
+            	ps.value = "";
+            ps.value += "{";	
             for (int i = 0; i < len; i++)
             {
                 IMXMLPropertySpecifierNode propName = (IMXMLPropertySpecifierNode)node.getChild(i);


Mime
View raw message