aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuldoman <giulio.lettieri@gmail.com>2024-10-27 16:20:44 +0100
committerGitHub <noreply@github.com>2024-10-27 16:20:44 +0100
commit5e2292c6226920a659ff3fe798936d614138e236 (patch)
tree64b8a28c603001a074da0a32ce7d8683b6091cbd
parent03c8b329a291021fe393c25e9d3fd2f58965b537 (diff)
downloadlite-xl-plugins-5e2292c6226920a659ff3fe798936d614138e236.tar.gz
lite-xl-plugins-5e2292c6226920a659ff3fe798936d614138e236.zip
refactor: cleaner solution to avoid `language_java` catastrophic backtracking (#463)
-rw-r--r--manifest.json2
-rw-r--r--plugins/language_java.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/manifest.json b/manifest.json
index 730ab3b..900e567 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1150,7 +1150,7 @@
"tags": [
"language"
],
- "version": "0.1.2"
+ "version": "0.1.3"
},
{
"description": "Syntax for the [jiyu](https://github.com/machinamentum/jiyu) programming language",
diff --git a/plugins/language_java.lua b/plugins/language_java.lua
index d49472f..873d827 100644
--- a/plugins/language_java.lua
+++ b/plugins/language_java.lua
@@ -18,7 +18,7 @@ syntax.add {
{ pattern = "-?%.?%d+f?", type = "number" },
{ pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" },
{ pattern = "[%a_][%w_]*%f[(]", type = "function" },
- { regex = "(?:\\w++\\.?)+(?=\\s+\\w++\\s*\\=\\s*)", type = "function" }, -- Class name when creating an object
+ { regex = "(?>\\w+\\.?)+(?=\\s+\\w++\\s*\\=\\s*)", type = "function" }, -- Class name when creating an object
{ regex = "[A-Z][A-Z_]+", type = "keyword2" }, -- Constants
{ pattern = "[%a_][%w_]*", type = "symbol" },
},