Fixed #2183 AS1/2 Direct editation - case sensitive identifiers since SWF version 7

This commit is contained in:
Jindra Petřík
2024-08-05 11:17:25 +02:00
parent 21a76bd20e
commit e9dcd5ad34
5 changed files with 427 additions and 209 deletions
@@ -258,6 +258,11 @@ public class ActionPanel extends JPanel implements SearchListener<ScriptSearchRe
ident = tData.toString();
//We need to get unescaped identifier, so we use our Lexer
ActionScriptLexer lex = new ActionScriptLexer(new StringReader(ident));
if (src != null) {
if (src.getSwf().version >= ActionScriptLexer.SWF_VERSION_CASE_SENSITIVE) {
lex.setCaseSensitiveIdentifiers(true);
}
}
try {
ParsedSymbol symb = lex.lex();
if (symb.type == SymbolType.IDENTIFIER) {