You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/10/02 00:36:54 UTC

[2/5] git commit: [flex-falcon] [refs/heads/develop] - add source file to error output

add source file to error output


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

Branch: refs/heads/develop
Commit: 73fe2bc849ef1ec5ed4caf87067e7f9c7c60fbad
Parents: eec805b
Author: Alex Harui <ah...@apache.org>
Authored: Tue Sep 30 10:45:51 2014 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Sep 30 10:45:51 2014 -0700

----------------------------------------------------------------------
 .../flex/compiler/internal/mxml/MXMLTagAttributeData.java      | 4 ++++
 .../flex/compiler/internal/parsing/mxml/MXMLTagDataDepth.java  | 6 ++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/73fe2bc8/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java b/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
index c74dccb..5debe58 100644
--- a/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
+++ b/compiler/src/org/apache/flex/compiler/internal/mxml/MXMLTagAttributeData.java
@@ -96,7 +96,11 @@ public class MXMLTagAttributeData extends SourceLocation implements IMXMLTagAttr
             else
             {
                 if (!MXMLToken.isTagEnd(token.getType()) && token.getType() != MXMLTokenTypes.TOKEN_NAME)
+                {
+                    if (token.getSourcePath() == null)
+                        token.setSourcePath(spec.getPath());
                     problems.add(new SyntaxProblem(token));
+                }
                 // Restore the token position for error recovery.
                 tokenIterator.previous();
                 return;

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/73fe2bc8/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLTagDataDepth.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLTagDataDepth.java b/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLTagDataDepth.java
index 1b8e745..814bdd2 100644
--- a/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLTagDataDepth.java
+++ b/compiler/src/org/apache/flex/compiler/internal/parsing/mxml/MXMLTagDataDepth.java
@@ -251,6 +251,12 @@ class MXMLTagDataDepth {
 
     private ICompilerProblem produceProblemFromToken(IMXMLTagData tagData, IFileSpecification fileSpec)
     {
+        if (tagData instanceof MXMLTagData)
+        {
+            MXMLTagData tag = (MXMLTagData)tagData;
+            if (tag.getSourcePath() == null)
+                tag.setSourcePath(fileSpec.getPath());
+        }
         return new SyntaxProblem(tagData, tagData.getName());
     }