flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - FLEX-35077 handle more XML in assignments
Date Tue, 12 Apr 2016 23:34:00 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop 395863b00 -> 0b74b6a35


FLEX-35077 handle more XML in assignments


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

Branch: refs/heads/develop
Commit: 0b74b6a3514bf68ab67016aa5aed5c40943f4139
Parents: 395863b
Author: Alex Harui <aharui@apache.org>
Authored: Tue Apr 12 16:34:04 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Apr 12 16:34:04 2016 -0700

----------------------------------------------------------------------
 .../internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java  | 8 ++++++++
 .../compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java | 2 ++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0b74b6a3/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
----------------------------------------------------------------------
diff --git a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
index 3fb8e67..de10f74 100644
--- a/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
+++ b/compiler.jx.tests/src/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSGlobalClasses.java
@@ -549,6 +549,14 @@ public class TestFlexJSGlobalClasses extends TestGoogGlobalClasses
     }
     
     @Test
+    public void testXMLListSetAttributeComplex()
+    {
+        IBinaryOperatorNode node = getBinaryNode("var a:XMLList;a.(@id==3).@height = '100px'");
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("a.filter(function(node){return (node.attribute('id') == 3)}).setAttribute('height',
'100px')");
+    }
+    
+    @Test
     public void testXMLSetChild()
     {
         IBinaryOperatorNode node = getBinaryNode("var a:XML = new XML(\"<top attr1='cat'><child
attr2='dog'><grandchild attr3='fish'>text</grandchild></child></top>\");a.foo
= a.child");

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0b74b6a3/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
index d345277..99114b3 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/flexjs/JSFlexJSEmitter.java
@@ -917,6 +917,8 @@ public class JSFlexJSEmitter extends JSGoogEmitter implements IJSFlexJSEmitter
 				return IdentifierNode.isXMLish(leftDef, getWalker().getProject());
 
 		}
+		else if (leftID == ASTNodeID.E4XFilterID)
+			return true;
     	return false;
     }
     


Mime
View raw message