aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_wren.lua17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/language_wren.lua b/plugins/language_wren.lua
index 2022dbf..593cd46 100644
--- a/plugins/language_wren.lua
+++ b/plugins/language_wren.lua
@@ -5,22 +5,31 @@ syntax.add {
name = "Wren",
files = { "%.wren$" },
comment = "//",
+ block_comment = {"/*", "*/"},
patterns = {
{ pattern = "//.-\n", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" },
{ pattern = { '"', '"', '\\' }, type = "string" },
- { pattern = { "'", "'", '\\' }, type = "string" },
- { pattern = "-?%.?%d+", type = "number" },
+ { pattern = "%d+%.%d+[Ee]%d+", type = "number" },
+ { pattern = "%d+%.%d+", type = "number" },
+ { pattern = "%d+[Ee]%d+", type = "number" },
+ { pattern = "0x%x+", type = "number" },
+ { pattern = "%d+", type = "number" },
{ pattern = "%.%.%.?", type = "operator" },
{ pattern = "[<>!=]=", type = "operator" },
+ { pattern = "|[^|]+|%s+", type = "string" },
{ pattern = "[%+%-=/%*%^%%<>!~|&?:]", type = "operator" },
- { pattern = "[%a_][%w_]*%s*%f[(\"{]", type = "function" },
- { pattern = "[%a_][%w_]*", type = "symbol" },
+ { pattern = "_[%w_]*", type = "keyword2" },
+ { pattern = "%a[%w_]*()%s+()is()%s+%a[%w_]*%s*%f[{]", type = {"function", "normal", "keyword", "normal"}},
+ { pattern = "%a[%w_]*%s*=()%s*%f[(]", type = {"function", "normal"} },
+ { pattern = "%a[%w_]*()%s*%f[({]", type = {"function", "normal"} },
+ { pattern = "%a[%w_]+", type = "symbol" },
},
symbols = {
["break"] = "keyword",
["class"] = "keyword",
["construct"] = "keyword",
+ ["continue"] = "keyword",
["else"] = "keyword",
["for"] = "keyword",
["foreign"] = "keyword",