summaryrefslogtreecommitdiff
path: root/context/data/vscode/extensions/context/syntaxes/context-syntax-lua.json
diff options
context:
space:
mode:
Diffstat (limited to 'context/data/vscode/extensions/context/syntaxes/context-syntax-lua.json')
-rw-r--r--context/data/vscode/extensions/context/syntaxes/context-syntax-lua.json184
1 files changed, 184 insertions, 0 deletions
diff --git a/context/data/vscode/extensions/context/syntaxes/context-syntax-lua.json b/context/data/vscode/extensions/context/syntaxes/context-syntax-lua.json
new file mode 100644
index 000000000..9cd7a681d
--- /dev/null
+++ b/context/data/vscode/extensions/context/syntaxes/context-syntax-lua.json
@@ -0,0 +1,184 @@
+{
+ "name" : "context.lua",
+ "patterns" : [
+ {
+ "include" : "#keyword"
+ },
+ {
+ "include" : "#buildin"
+ },
+ {
+ "include" : "#constant"
+ },
+ {
+ "include" : "#csname"
+ },
+ {
+ "include" : "#goto"
+ },
+ {
+ "include" : "#number_hex"
+ },
+ {
+ "include" : "#number"
+ },
+ {
+ "include" : "#identifier_keyword"
+ },
+ {
+ "include" : "#identifier_valid"
+ },
+ {
+ "include" : "#longcomment"
+ },
+ {
+ "include" : "#string_long"
+ },
+ {
+ "include" : "#string_double"
+ },
+ {
+ "include" : "#string_single"
+ },
+ {
+ "include" : "#shortcomment"
+ },
+ {
+ "include" : "#label"
+ },
+ {
+ "include" : "#operator"
+ }
+ ],
+ "repository" : {
+ "builtin" : {
+ "match" : "(xpcall|utf8|unpack|type|tostring|tonumber|table|string|setmetatable|select|require|rawset|rawget|rawequal|print|pcall|pairs|package|os|next|module|math|lpeg|loadfile|load|ipairs|io|getmetatable|file|error|dofile|debug|coroutine|collectgarbage|bit32|assert)(?=[^a-zA-Z])",
+ "name" : "context.plain.reserved.builtin.lua"
+ },
+ "constant" : {
+ "match" : "(__unm|__tostring|__sub|__pow|__pairs|__newindex|__mul|__mode|__metatable|__lt|__len|__le|__ipairs|__index|__idiv|__gc|__eq|__div|__concat|__close|__call|__add|_VERSION|_M|_G|_ENV|\u005C.\u005C.\u005C.|NaN|<toclose>|<const>)(?=[^a-zA-Z])",
+ "name" : "context.data.reserved.constants.lua"
+ },
+ "csname" : {
+ "begin" : "(metapost|metafun|ctx[A-Za-z_]*|context|commands)(?=[^a-zA-Z])",
+ "end" : "(?!(\u005Cs*[\u005C.\u005C:]*\u005Cs*[_\u005Cw][_\u005Cw0-9]*))",
+ "name" : "context.user.csname.lua",
+ "patterns" : [
+ {
+ "match" : "[\u005C.\u005C:]",
+ "name" : "context.operator.csname.qualifier.lua"
+ }
+ ]
+ },
+ "goto" : {
+ "captures" : {
+ "1" : {
+ "name" : "context.keyword.goto.keyword.lua"
+ },
+ "2" : {
+ "name" : "context.grouping.goto.target.lua"
+ }
+ },
+ "match" : "(goto)\u005Cs*([_\u005Cw][_\u005Cw0-9]*)"
+ },
+ "identifier_keyword" : {
+ "captures" : {
+ "1" : {
+ "name" : "context.operator.identifier.keyword.lua"
+ },
+ "2" : {
+ "name" : "context.warning.identifier.keyword.lua"
+ }
+ },
+ "match" : "\u005Cs*([\u005C.\u005C:])\u005Cs*(while|until|true|then|return|repeat|or|not|nil|local|in|if|function|for|false|end|elseif|else|do|break|and)(?=[^a-zA-Z])"
+ },
+ "identifier_valid" : {
+ "match" : "[_\u005Cw][_\u005Cw0-9]*",
+ "name" : "context.default.identifier.valid.lua"
+ },
+ "keyword" : {
+ "match" : "(while|until|true|then|return|repeat|or|not|nil|local|in|if|function|for|false|end|elseif|else|do|break|and)(?=[^a-zA-Z])",
+ "name" : "context.keyword.reserved.keyword.lua"
+ },
+ "label" : {
+ "captures" : {
+ "1" : {
+ "name" : "context.keyword.label.open.lua"
+ },
+ "2" : {
+ "name" : "context.grouping.label.target.lua"
+ },
+ "3" : {
+ "name" : "context.keyword.label.close.lua"
+ }
+ },
+ "match" : "(::)([_\u005Cw][_\u005Cw0-9]*)(::)"
+ },
+ "longcomment" : {
+ "begin" : "--\u005C[\u005C[",
+ "end" : "\u005C]\u005C]",
+ "name" : "context.comment.comment.long.lua"
+ },
+ "number" : {
+ "match" : "[\u005C-]?[0-9]+(\u005C.[0-9]+)?([eEpP]\u005C-?[0-9]+)?",
+ "name" : "context.number.decnumber.lua"
+ },
+ "number_hex" : {
+ "match" : "[\u005C-]?0[xX][A-Fa-f0-9]+(\u005C.[A-Fa-f0-9]+)?([eEpP]\u005C-?[A-Fa-f0-9]+)?",
+ "name" : "context.number.hexnumber.lua"
+ },
+ "operator" : {
+ "match" : "\u005C~|}|\u005C||{|\u005C^|\u005C]|\u005C[|>|=|<|;|:|/|\u005C.|\u005C-|,|\u005C+|\u005C*|\u005C)|\u005C(|\u005C'|\u005C%|#",
+ "name" : "context.special.operator.lua"
+ },
+ "shortcomment" : {
+ "match" : "--.*$\u005Cn?",
+ "name" : "context.comment.comment.short.lua"
+ },
+ "string_double" : {
+ "captures" : {
+ "1" : {
+ "name" : "context.special.doublequoted.open.lua"
+ },
+ "2" : {
+ "name" : "context.string.doublequoted.text.lua"
+ },
+ "3" : {
+ "name" : "context.special.doublequoted.close.lua"
+ }
+ },
+ "match" : "(\u0022)((?:\u005C\u005C\u0022|[^\u0022])*)(\u0022)"
+ },
+ "string_long" : {
+ "begin" : "\u005C[(=*)\u005C[",
+ "beginCaptures" : {
+ "0" : {
+ "name" : "context.special.string.long.open.lua"
+ }
+ },
+ "end" : "\u005C](\u005C2)\u005C]",
+ "endCaptures" : {
+ "0" : {
+ "name" : "context.special.string.long.close.lua"
+ }
+ },
+ "name" : "context.string.long.text.lua"
+ },
+ "string_single" : {
+ "captures" : {
+ "1" : {
+ "name" : "context.special.singlequoted.open.lua"
+ },
+ "2" : {
+ "name" : "context.string.singlequoted.text.lua"
+ },
+ "3" : {
+ "name" : "context.special.singlequoted.close.lua"
+ }
+ },
+ "match" : "(')((?:\u005C\u005C'|[^'])*)(')"
+ }
+ },
+ "scopeName" : "source.context.lua",
+ "version" : "1.0.0"
+} \ No newline at end of file