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] - report error for extraneous text in MXML
Date Sun, 04 Sep 2016 05:18:16 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop 4b149f4d4 -> 17f21f00e


report error for  extraneous text in MXML


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

Branch: refs/heads/develop
Commit: 17f21f00e2dfa6e141638f1eabf10f085acfd7bd
Parents: 4b149f4
Author: Alex Harui <aharui@apache.org>
Authored: Sat Sep 3 22:17:52 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Sat Sep 3 22:17:52 2016 -0700

----------------------------------------------------------------------
 .../internal/as/codegen/MXMLClassDirectiveProcessor.java         | 4 ++--
 .../compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java  | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/17f21f00/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
index 50762d7..9ee0b29 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
@@ -3602,7 +3602,7 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
                 context.startUsing(IL.MXML_CONTENT_FACTORY);
                 context.isContentFactory = true;
                 
-                traverse(propertyNode, context);
+                traverse(propertyNode, context, MXML_INSTANCE_NODES);
                 
                 context.isContentFactory = false;
                 context.stopUsing(IL.MXML_CONTENT_FACTORY, 0);
@@ -3643,7 +3643,7 @@ public class MXMLClassDirectiveProcessor extends ClassDirectiveProcessor
                 
                 context.addInstruction(OP_pushstring, propertyName);
                 
-                traverse(propertyNode, context);
+                traverse(propertyNode, context, MXML_INSTANCE_NODES);
                                 
                 context.stopUsing(IL.MXML_BEAD_PROPERTIES, 1);
                                 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/17f21f00/compiler/src/main/java/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
index 43c8ac3..0d3aab9 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/tree/mxml/MXMLClassReferenceNodeBase.java
@@ -25,6 +25,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.flex.compiler.constants.IASLanguageConstants;
 import org.apache.flex.compiler.definitions.IClassDefinition;
 import org.apache.flex.compiler.definitions.IDefinition;
 import org.apache.flex.compiler.definitions.IEffectDefinition;
@@ -611,7 +612,7 @@ abstract class MXMLClassReferenceNodeBase extends MXMLNodeBase implements
IMXMLC
     {
         // Non-whitespace may be the value of a default property.
         IVariableDefinition defaultPropertyDefinition = getDefaultPropertyDefinition(builder);
-        if (defaultPropertyDefinition != null)
+        if (defaultPropertyDefinition != null && defaultPropertyDefinition.getTypeAsDisplayString().equals(IASLanguageConstants.String))
         {
             MXMLSpecifierNodeBase childNode =
                     createSpecifierNode(builder, defaultPropertyDefinition.getBaseName());


Mime
View raw message