Improved Lua syntax (#201)
* improved Lua syntax * added some missing cases with number literals
This commit is contained in:
parent
b15914d664
commit
78999cabe2
|
@ -11,14 +11,21 @@ syntax.add {
|
||||||
{ pattern = { "%[%[", "%]%]" }, type = "string" },
|
{ pattern = { "%[%[", "%]%]" }, type = "string" },
|
||||||
{ pattern = { "%-%-%[%[", "%]%]"}, type = "comment" },
|
{ pattern = { "%-%-%[%[", "%]%]"}, type = "comment" },
|
||||||
{ pattern = "%-%-.-\n", type = "comment" },
|
{ pattern = "%-%-.-\n", type = "comment" },
|
||||||
{ pattern = "-?0x%x+", type = "number" },
|
{ pattern = "0x%x+%.%x*[pP][-+]?%d+", type = "number" },
|
||||||
{ pattern = "-?%d+[%d%.eE]*", type = "number" },
|
{ pattern = "0x%x+%.%x*", type = "number" },
|
||||||
{ pattern = "-?%.?%d+", type = "number" },
|
{ pattern = "0x%.%x+[pP][-+]?%d+", type = "number" },
|
||||||
|
{ pattern = "0x%.%x+", type = "number" },
|
||||||
|
{ pattern = "0x%x+[pP][-+]?%d+", type = "number" },
|
||||||
|
{ pattern = "0x%x+", type = "number" },
|
||||||
|
{ pattern = "%d%.%d*[eE][-+]?%d+", type = "number" },
|
||||||
|
{ pattern = "%d%.%d*", type = "number" },
|
||||||
|
{ pattern = "%.?%d*[eE][-+]?%d+", type = "number" },
|
||||||
|
{ pattern = "%.?%d+", type = "number" },
|
||||||
{ pattern = "<%a+>", type = "keyword2" },
|
{ pattern = "<%a+>", type = "keyword2" },
|
||||||
{ pattern = "%.%.%.?", type = "operator" },
|
{ pattern = "%.%.%.?", type = "operator" },
|
||||||
{ pattern = "[<>~=]=", type = "operator" },
|
{ pattern = "[<>~=]=", type = "operator" },
|
||||||
{ pattern = "[%+%-=/%*%^%%#<>]", type = "operator" },
|
{ pattern = "[%+%-=/%*%^%%#<>]", type = "operator" },
|
||||||
{ pattern = "[%a_][%w_]*%s*%f[(\"{]", type = "function" },
|
{ pattern = "[%a_][%w_]*()%s*%f[(\"'{]", type = {"function", "normal"} },
|
||||||
{ pattern = "[%a_][%w_]*", type = "symbol" },
|
{ pattern = "[%a_][%w_]*", type = "symbol" },
|
||||||
{ pattern = "::[%a_][%w_]*::", type = "function" },
|
{ pattern = "::[%a_][%w_]*::", type = "function" },
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue