Initial commit

This commit is contained in:
Patrick Alvin Alcala 2025-06-26 16:53:43 +08:00
commit 209ba130c0
4852 changed files with 1517959 additions and 0 deletions

View file

@ -0,0 +1,40 @@
-- mod-version:3
local syntax = require "core.syntax"
syntax.add {
name = "TOML",
files = { "%.toml$" },
comment = '#',
patterns = {
{ pattern = "#.*", type = "comment" },
{ pattern = { '"""', '"""', '\\' }, type = "string" },
{ pattern = { "'''", "'''" }, type = "string" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'" }, type = "string" },
{ pattern = "[%w_%.%-]+%s*%f[=]", type = "function" },
{ pattern = {"^%s*%[", "%]"}, type = "keyword" },
{ pattern = "0x[%x_]+", type = "number" },
{ pattern = "0o[0-7_]+", type = "number" },
{ pattern = "0b[01_]+", type = "number" },
{ pattern = "%d[%d_]*%.?[%d_]*[eE][%-+]?[%d_]+", type = "number" },
{ pattern = "%d[%d_]*%.?[$d_]*", type = "number" },
{ pattern = "%f[-+%w_][-+]%f[%w%.]", type = "number" },
{ pattern = "[%+%-:TZ]", type = "operator" },
{ pattern = "%a+", type = "symbol" },
},
symbols = {
["true"] = "literal",
["false"] = "literal",
["nan"] = "number",
["inf"] = "number"
},
}