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 2016/11/22 20:09:51 UTC
git commit: [flex-falcon] [refs/heads/develop] - FLEX-35182 report
error on missing end tags. You may see the same error more than once,
but that is potentially due to the JIRA issue 35181
Repository: flex-falcon
Updated Branches:
refs/heads/develop 4ff47a036 -> a4b560562
FLEX-35182 report error on missing end tags. You may see the same error more than once, but that is potentially due to the JIRA issue 35181
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/a4b56056
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/a4b56056
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/a4b56056
Branch: refs/heads/develop
Commit: a4b56056259b7aade988d58c55a393a0f8782ef0
Parents: 4ff47a0
Author: Alex Harui <ah...@apache.org>
Authored: Tue Nov 22 12:09:35 2016 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Nov 22 12:09:35 2016 -0800
----------------------------------------------------------------------
.../apache/flex/compiler/internal/mxml/MXMLTagData.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a4b56056/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java b/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java
index 1a1a3f0..61f708d 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/mxml/MXMLTagData.java
@@ -45,6 +45,7 @@ import org.apache.flex.compiler.parsing.IMXMLToken;
import org.apache.flex.compiler.parsing.MXMLTokenTypes;
import org.apache.flex.compiler.problems.ICompilerProblem;
import org.apache.flex.compiler.problems.MXMLDuplicateAttributeProblem;
+import org.apache.flex.compiler.problems.MXMLUnclosedTagProblem;
import org.apache.flex.compiler.problems.SyntaxProblem;
import org.apache.flex.utils.FastStack;
@@ -148,6 +149,11 @@ public class MXMLTagData extends MXMLUnitData implements IMXMLTagData
*/
protected boolean explicitCloseToken;
+ /**
+ * The problems list in case we find a problem later
+ */
+ Collection<ICompilerProblem> problems;
+
/*
* unlike most MXML units, our "content" bounds are not the same as the
* {@link SourceLocation#getStart()} For tags, we don't count the outer
@@ -169,6 +175,7 @@ public class MXMLTagData extends MXMLUnitData implements IMXMLTagData
@SuppressWarnings("fallthrough")
MutablePrefixMap init(IMXMLData mxmlData, MXMLToken nameToken, ListIterator<MXMLToken> tokenIterator, MXMLDialect dialect, IFileSpecification spec, Collection<ICompilerProblem> problems)
{
+ this.problems = problems;
setSourcePath(mxmlData.getPath());
MutablePrefixMap map = null;
emptyTag = false;
@@ -903,6 +910,11 @@ public class MXMLTagData extends MXMLUnitData implements IMXMLTagData
}
}
}
+ if (!tagStack.isEmpty())
+ {
+ IMXMLTagData pop = tagStack.pop();
+ problems.add(new MXMLUnclosedTagProblem(pop, pop.getName()));
+ }
return null;
}