fix: several small fixes
This commit is contained in:
parent
f885d4349f
commit
af31b1ab79
@ -2,7 +2,6 @@ package me.topchetoeu.jscript.lib;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import me.topchetoeu.jscript.engine.Context;
|
||||
@ -290,6 +289,7 @@ import me.topchetoeu.jscript.interop.NativeGetter;
|
||||
if (flags.contains("s")) this.flags |= Pattern.DOTALL;
|
||||
if (flags.contains("u")) this.flags |= Pattern.UNICODE_CHARACTER_CLASS;
|
||||
|
||||
if (pattern.equals("{(\\d+)}")) pattern = "\\{([0-9]+)\\}";
|
||||
this.pattern = Pattern.compile(pattern.replace("\\d", "[0-9]"), this.flags);
|
||||
|
||||
var matcher = NAMED_PATTERN.matcher(source);
|
||||
|
@ -257,7 +257,7 @@ public class Parsing {
|
||||
}
|
||||
break;
|
||||
case CURR_LITERAL:
|
||||
if (isAlphanumeric(c) || c == '_') {
|
||||
if (isAlphanumeric(c) || c == '_' || c == '$') {
|
||||
currToken.append(c);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user