mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 20:44:08 +00:00
Improved Loop patterns
This commit is contained in:
1 parent
627b973175
commit
a00dbf4b1a
1 file changed
+2
-2
+2
-2
@@ -12,9 +12,9 @@ import java.util.regex.Pattern;
|
||||
class LoopVariableParser {
|
||||
|
||||
private static final Pattern ENHANCED_FOR = Pattern.compile(
|
||||
"\\bfor\\s*\\(\\s*([A-Za-z_][\\w.<>,\\[\\] \\t]*?(?:\\[\\s*\\])*)\\s+(\\w+)\\s*:\\s*([^)]+)\\)");
|
||||
"\\bfor\\s*\\(\\s*([A-Za-z_][\\w.<>,\\[\\] \\t\\n\\r]*?(?:\\[\\s*\\])*)\\s+(\\w+)\\s*:\\s*([^)]+)\\)");
|
||||
private static final Pattern CLASSIC_FOR = Pattern.compile(
|
||||
"\\bfor\\s*\\(\\s*([A-Za-z_][\\w.<>,\\[\\] \\t]*?(?:\\[\\s*\\])*)\\s+(\\w+)\\s*=");
|
||||
"\\bfor\\s*\\(\\s*([A-Za-z_][\\w.<>,\\[\\] \\t\\n\\r]*?(?:\\[\\s*\\])*)\\s+(\\w+)\\s*=");
|
||||
private static final Pattern FOR_IN = Pattern.compile(
|
||||
"\\bfor\\s*\\(\\s*(?:var|let|const)\\s+(\\w+)\\s+in\\s+([^)]+)\\)");
|
||||
private static final Pattern FOR_OF = Pattern.compile(
|
||||
|
||||
Reference in new issue
Block a user