diff options
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | plugins/language_rivet.lua | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/manifest.json b/manifest.json index e900928..fb01048 100644 --- a/manifest.json +++ b/manifest.json @@ -784,7 +784,7 @@ }, { "description": "Syntax for the [Rivet](https://github.com/rivet-lang/rivet) programming language", - "version": "0.1", + "version": "0.2", "path": "plugins/language_rivet.lua", "id": "language_rivet", "mod_version": "3" diff --git a/plugins/language_rivet.lua b/plugins/language_rivet.lua index b6216cc..cccccf0 100644 --- a/plugins/language_rivet.lua +++ b/plugins/language_rivet.lua @@ -25,21 +25,22 @@ syntax.add { {pattern = "[%[%]%(%)%+%-=/%*%^%%<>!~|&%.%?:;]", type = "operator"}, { pattern = "_?%u[%u_][%u%d_]*%f[%s%+%*%-%.%)%]}%?%^%%=/<>~|&;:,!]", - type = "number" + type = "literal" }, {pattern = "[A-Z][%w_]*", type = "keyword2"}, -- types {pattern = "%@%s?[%a_][%w_]*", type = "literal"}, -- builtin func/var {pattern = "[%a_][%w_]*%f[(]", type = "function"}, - {pattern = "[%a_][%w_]*", type = "symbol"}, - {pattern = {"#%[", "%]"}, type = "literal"}, - {pattern = "#%s?[%a_][%w_]*", type = "comment"} -- if/elif/else/endif + {pattern = "#%s?[%a_][%w_]*", type = "comment"}, -- if/else_if/else/endif + {pattern = "[%a_][%w_]*", type = "symbol"} }, symbols = { ["alias"] = "keyword", ["and"] = "keyword", ["as"] = "keyword", ["break"] = "keyword", + ["c_import"] = "keyword", ["catch"] = "keyword", + ["comptime"] = "keyword", ["const"] = "keyword", ["continue"] = "keyword", ["defer"] = "keyword", @@ -58,7 +59,7 @@ syntax.add { ["in"] = "keyword", ["is"] = "keyword", ["mut"] = "keyword", - ["nil"] = "literal", + ["none"] = "literal", ["or"] = "keyword", ["public"] = "keyword", ["return"] = "keyword", @@ -68,6 +69,7 @@ syntax.add { ["test"] = "keyword", ["trait"] = "keyword", ["true"] = "literal", + ["undefined"] = "keyword", ["unsafe"] = "keyword", ["var"] = "keyword", ["while"] = "keyword", |