1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
-- lite-xl 1.16
local syntax = require "core.syntax"
syntax.add {
files = "meson.build$",
comment = "#",
patterns = {
{ pattern = { "#", "\n" }, type = "comment" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = { "'''", "'''" }, type = "string" },
{ pattern = "0x[%da-fA-F]+", type = "number" },
{ pattern = "-?%d+%d*", type = "number" },
{ pattern = "[%+%-=/%%%*!]", type = "operator" },
{ pattern = "[%a_][%w_]*%f[(]", type = "function" },
{ pattern = "[%a_][%w_]*", type = "symbol" },
},
symbols = {
["if"] = "keyword",
["then"] = "keyword",
["else"] = "keyword",
["elif"] = "keyword",
["endif"] = "keyword",
["foreach"] = "keyword",
["endforeach"] = "keyword",
["break"] = "keyword",
["continue"] = "keyword",
["and"] = "keyword",
["not"] = "keyword",
["or"] = "keyword",
["in"] = "keyword",
["true"] = "literal",
["false"] = "literal",
},
}
|