mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-07 18:05:23 +00:00
Fixed: "protected", "const", "namespace", "package" are not reserved keywords in AS1/2
Fixed: Not counting newlines in comments
This commit is contained in:
@@ -106,6 +106,9 @@ import java.util.Stack;
|
||||
return ret;
|
||||
}
|
||||
|
||||
private int count(String str, String target) {
|
||||
return (str.length() - str.replace(target, "").length()) / target.length();
|
||||
}
|
||||
%}
|
||||
|
||||
/* main character classes */
|
||||
@@ -357,7 +360,7 @@ RegExp = \/([^\r\n/]|\\\/)+\/[a-z]*
|
||||
{DoubleLiteral} { return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, Double.parseDouble((yytext()))); }
|
||||
|
||||
/* comments */
|
||||
{Comment} { /*ignore*/ }
|
||||
{Comment} { yyline += count(yytext(),"\n"); }
|
||||
|
||||
{LineTerminator} { yyline++;}
|
||||
/* whitespace */
|
||||
|
||||
Reference in New Issue
Block a user