2022-03-24 16:57:26 +01:00
|
|
|
-- mod-version:3 -- lite-xl 2.1
|
2019-12-28 12:16:32 +01:00
|
|
|
local syntax = require "core.syntax"
|
|
|
|
|
|
|
|
syntax.add {
|
2021-11-21 03:46:43 +01:00
|
|
|
name = "XML",
|
2021-05-01 11:45:30 +02:00
|
|
|
files = { "%.xml$" },
|
2020-06-08 10:44:51 +02:00
|
|
|
headers = "<%?xml",
|
2021-12-26 08:05:27 +01:00
|
|
|
block_comment = { "<!--", "-->" },
|
2019-12-28 12:16:32 +01:00
|
|
|
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 = {},
|
|
|
|
}
|