-
Notifications
You must be signed in to change notification settings - Fork 2
/
cukmekerb_language_xml.lua
24 lines (23 loc) · 970 Bytes
/
cukmekerb_language_xml.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- mod-version:3
local syntax = require "core.syntax"
syntax.add {
name = "XML",
files = { "%.xml$" },
headers = "<%?xml",
block_comment = { "<!--", "-->" },
patterns = {
{ pattern = { "<!%-%-", "%-%->" }, type = "comment" },
{ pattern = { '%f[^>][^<]', '%f[<]' }, type = "normal" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = "0x[%da-fA-F]+", type = "number" },
{ pattern = "-?%d+[%d%.]*f?", type = "number" },
{ pattern = "-?%.?%d+f?", type = "number" },
{ pattern = "%f[^<]![%a_][%w_]*", type = "literal" },
{ pattern = "%f[^<][%a_][%w_]*", type = "keyword" },
{ pattern = "%f[^<]/[%a_][%w_]*", type = "keyword" },
{ pattern = "[%a_][%w_]*", type = "literal" },
{ pattern = "[/<>=]", type = "operator" },
},
symbols = {},
}