From 0d8c4544abc0a7ebff018ceacdbcd4ab9ff9cce2 Mon Sep 17 00:00:00 2001 From: rxi Date: Sun, 30 Aug 2020 09:57:07 +0100 Subject: language_odin improvements --- plugins/language_odin.lua | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/plugins/language_odin.lua b/plugins/language_odin.lua index 6f393c8..fb60a6c 100644 --- a/plugins/language_odin.lua +++ b/plugins/language_odin.lua @@ -4,25 +4,23 @@ syntax.add { files = "%.odin$", comment = "//", patterns = { - { pattern = "//.-\n", type = "comment" }, - { pattern = { "/%*", "%*/" }, type = "comment" }, - { pattern = { '"', '"', '\\' }, type = "string" }, - { pattern = { "'", "'", '\\' }, type = "string" }, - { pattern = { "`", "`", '\\' }, type = "string" }, - { pattern = "0b[0-1]+", type = "number" }, - { pattern = "0o[0-7]+", type = "number" }, - { pattern = "0d[%d]+", type = "number" }, - { pattern = "0z[%d]+", type = "number" }, - { pattern = "0x[%da-fA-F]+", type = "number" }, - { pattern = "-?%d+[%d%.]*", type = "number" }, - { pattern = "-?%.?%d+?", type = "number" }, - { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, - { pattern = "[<>~=+-*/]=", type = "operator" }, - { pattern = "[::][:=]", type = "operator" }, - { pattern = "[:]", type = "operator" }, - { pattern = "$[TE]", type = "operator" }, - { pattern = "[%a_][%w_]*%f[(]", type = "function" }, - { pattern = "[#@]?[%a_][%w_]*", type = "symbol" }, + { pattern = "//.-\n", type = "comment" }, + { pattern = { "/%*", "%*/" }, type = "comment" }, + { pattern = { '"', '"', '\\' }, type = "string" }, + { pattern = { "'", "'", '\\' }, type = "string" }, + { pattern = { "`", "`" }, type = "string" }, + { pattern = "0b[01_]+", type = "number" }, + { pattern = "0o[0-7_]+", type = "number" }, + { pattern = "0[dz][%d_]+", type = "number" }, + { pattern = "0x[%da-fA-F_]+", type = "number" }, + { pattern = "-?%d+[%d%._e]*i?", type = "number" }, + { pattern = "-?%.?[%d_]+i?", type = "number" }, + { pattern = "[<>~=+-*/]=", type = "operator" }, + { pattern = "[::][:=]", type = "operator" }, + { pattern = "[%+%-=/%*%^%%<>!~|&:]", type = "operator" }, + { pattern = "%$[%a_][%w_]*", type = "operator" }, + { pattern = "[%a_][%w_]*%f[(]", type = "function" }, + { pattern = "[#@]?[%a_][%w_]*", type = "symbol" }, }, symbols = { -- Keywords -- cgit v1.2.3