From d7ad7c0e3fecaf2c837c1017b385ddef0721911b Mon Sep 17 00:00:00 2001 From: ThaCuber <70547062+ThaCuber@users.noreply.github.com> Date: Sun, 22 Jan 2023 15:34:37 -0400 Subject: Added annotations to language_wren.lua (#175) * Added annotations to language_wren.lua * sneaked in Fn.new being highlighted as a literal also fixed file formatting, looks less ugly now --- plugins/language_wren.lua | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'plugins') diff --git a/plugins/language_wren.lua b/plugins/language_wren.lua index 593cd46..35b8b8a 100644 --- a/plugins/language_wren.lua +++ b/plugins/language_wren.lua @@ -7,23 +7,25 @@ syntax.add { comment = "//", block_comment = {"/*", "*/"}, patterns = { - { pattern = "//.-\n", type = "comment" }, - { pattern = { "/%*", "%*/" }, type = "comment" }, - { pattern = { '"', '"', '\\' }, type = "string" }, - { 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 = "_[%w_]*", type = "keyword2" }, + { pattern = "//.-\n", type = "comment" }, + { pattern = { "/%*", "%*/" }, type = "comment" }, + { pattern = { '"', '"', '\\' }, type = "string" }, + { 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 = "_[%w_]*", type = "keyword2" }, + { regex = [[\bFn.new\b]], type = "literal" }, + { pattern = "#!?%a[%w_]*%s*%(?[%w _,\"=]*%)?", type = "comment" }, { 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" }, + { 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", -- cgit v1.2.3