You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
915 B
22 lines
915 B
3 years ago
|
local syntax = require "core.syntax"
|
||
|
|
||
|
syntax.add {
|
||
|
files = { "%.xml$", "%.html?$" },
|
||
|
headers = "<%?xml",
|
||
|
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 = "keyword2" },
|
||
|
{ pattern = "%f[^<][%a_][%w_]*", type = "function" },
|
||
|
{ pattern = "%f[^<]/[%a_][%w_]*", type = "function" },
|
||
|
{ pattern = "[%a_][%w_]*", type = "keyword" },
|
||
|
{ pattern = "[/<>=]", type = "operator" },
|
||
|
},
|
||
|
symbols = {},
|
||
|
}
|