Fixed: AS3 direct editation - NaN can be used as identifier

This commit is contained in:
Jindra Petřík
2025-05-31 13:17:23 +02:00
parent 7588307dd0
commit 236c3b9e6a
6 changed files with 998 additions and 1007 deletions

View File

@@ -2587,10 +2587,10 @@ public class ActionScript3Parser {
ret = function(allOpenedNamespaces, new ArrayList<>(), pkg, false, false, needsActivation, importedClasses, thisType, openedNamespaces, fname, false, variables, abc);
allowMemberOrCall = true;
break;
case NAN:
/*case NAN:
ret = new NanAVM2Item(null, null);
break;
break;*/
case INFINITY:
ret = new DoubleValueAVM2Item(null, null, Double.POSITIVE_INFINITY);

View File

@@ -1872,9 +1872,9 @@ public class ActionScript3SimpleParser implements SimpleParser {
ret = true;
allowMemberOrCall = true;
break;
case NAN:
/*case NAN:
ret = true;
break;
break;*/
case INFINITY:
ret = true;
break;

View File

@@ -503,10 +503,9 @@ public enum SymbolType {
* Other: undefined
*/
UNDEFINED(GraphTargetItem.PRECEDENCE_PRIMARY, false),
/**
* Other: NaN
*/
NAN(GraphTargetItem.PRECEDENCE_PRIMARY, false),
//NAN(GraphTargetItem.PRECEDENCE_PRIMARY, false),
/**
* Keyword: final
*/