From a27e0ba00ad317c21cb06963007197ccec972ebe Mon Sep 17 00:00:00 2001 From: StunxFS <56417208+StunxFS@users.noreply.github.com> Date: Fri, 19 May 2023 15:14:54 -0400 Subject: update `language_rivet.lua` (#250) * update `language_rivet.lua` * update manifest.json: bump version --- manifest.json | 2 +- 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", -- cgit v1.2.3