You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2021/11/24 19:25:25 UTC
[royale-compiler] branch develop updated: RawMXMLTokenizer: fix being incorrectly interpreted as an unclosed ASDoc comment instead of a properly closed regular XML comment
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new db68faa RawMXMLTokenizer: fix <!----> being incorrectly interpreted as an unclosed ASDoc comment instead of a properly closed regular XML comment
db68faa is described below
commit db68faaf67758bd64906e8a984374590b4155f31
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Nov 24 11:23:30 2021 -0800
RawMXMLTokenizer: fix <!----> being incorrectly interpreted as an unclosed ASDoc comment instead of a properly closed regular XML comment
---
.../royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex | 5 +++++
.../royale/compiler/internal/parsing/mxml/MXMLTokenizerTests.java | 1 -
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/compiler/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex b/compiler/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex
index 201f961..00579ba 100644
--- a/compiler/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex
+++ b/compiler/src/main/jflex/org/apache/royale/compiler/internal/parsing/mxml/RawMXMLTokenizer.lex
@@ -156,6 +156,11 @@ WHITE_SPACE_CHAR=[\r\n\ \t\b\012]
yybegin(WHITESPACE);
}
+<YYINITIAL> "<!---->"
+{
+ return buildToken(TOKEN_COMMENT);
+}
+
<YYINITIAL> "<!--"
{
startAggregate();
diff --git a/compiler/src/test/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLTokenizerTests.java b/compiler/src/test/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLTokenizerTests.java
index 0362fce..cbd1ce9 100644
--- a/compiler/src/test/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLTokenizerTests.java
+++ b/compiler/src/test/java/org/apache/royale/compiler/internal/parsing/mxml/MXMLTokenizerTests.java
@@ -84,7 +84,6 @@ public class MXMLTokenizerTests
* Smallest normal comment.
* This is getting incorrectly lexed as an ASDoc comment.
*/
- @Ignore
@Test
public void comment1()
{