| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- {
- "version": "https://github.com/textmate/lua.tmbundle/commit/42da2c6ff5d86c068f72520f856190f413911a80",
- "comment": "xmake.lua Syntax",
- "fileTypes": [
- "xmake",
- "xmake.lua"
- ],
- "firstLineMatch": "\\A#!.*?\\blua(\\d+(\\.\\d+)?)?\\b|\\A--\\s+-\\*-\\s*lua\\s*-\\*-",
- "keyEquivalent": "^~L",
- "name": "XMake",
- "patterns": [
- {
- "begin": "\\b((local\\b)\\s+)?(function)\\s*(\\s+[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*(:[a-zA-Z_][a-zA-Z0-9_]*)?\\s*)?(\\()",
- "beginCaptures": {
- "1": {
- "name": "storage.modifier.local.xmake"
- },
- "3": {
- "name": "keyword.control.xmake"
- },
- "4": {
- "name": "entity.name.function.xmake"
- },
- "5": {
- "name": "punctuation.definition.parameters.begin.xmake"
- }
- },
- "end": "\\)",
- "endCaptures": {
- "0": {
- "name": "punctuation.definition.parameters.end.xmake"
- }
- },
- "name": "meta.function.xmake",
- "patterns": [
- {
- "match": "[a-zA-Z_][a-zA-Z0-9_]*",
- "name": "variable.parameter.function.xmake"
- }
- ]
- },
- {
- "match": "(?<![\\w\\d.])0[xX][0-9A-Fa-f]+(?![pPeE.0-9])",
- "name": "constant.numeric.integer.hexadecimal.xmake"
- },
- {
- "match": "(?<![\\w\\d.])0[xX][0-9A-Fa-f]+(\\.[0-9A-Fa-f]+)?([eE]-?\\d*)?([pP][-+]\\d+)?",
- "name": "constant.numeric.float.hexadecimal.xmake"
- },
- {
- "match": "(?<![\\w\\d.])\\d+(?![pPeE.0-9])",
- "name": "constant.numeric.integer.xmake"
- },
- {
- "match": "(?<![\\w\\d.])\\d+(\\.\\d+)?([eE]-?\\d*)?",
- "name": "constant.numeric.float.xmake"
- },
- {
- "begin": "'",
- "beginCaptures": {
- "0": {
- "name": "punctuation.definition.string.begin.xmake"
- }
- },
- "end": "'",
- "endCaptures": {
- "0": {
- "name": "punctuation.definition.string.end.xmake"
- }
- },
- "name": "string.quoted.single.xmake",
- "patterns": [
- {
- "include": "#escaped_char"
- }
- ]
- },
- {
- "begin": "\"",
- "beginCaptures": {
- "0": {
- "name": "punctuation.definition.string.begin.xmake"
- }
- },
- "end": "\"",
- "endCaptures": {
- "0": {
- "name": "punctuation.definition.string.end.xmake"
- }
- },
- "name": "string.quoted.double.xmake",
- "patterns": [
- {
- "include": "#escaped_char"
- }
- ]
- },
- {
- "begin": "(?<=\\.cdef)\\s*(\\[(=*)\\[)",
- "beginCaptures": {
- "0": {
- "name": "string.quoted.other.multiline.xmake"
- },
- "1": {
- "name": "punctuation.definition.string.begin.xmake"
- }
- },
- "contentName": "meta.embedded.xmake",
- "end": "(\\]\\2\\])",
- "endCaptures": {
- "0": {
- "name": "string.quoted.other.multiline.xmake"
- },
- "1": {
- "name": "punctuation.definition.string.end.xmake"
- }
- },
- "patterns": [
- {
- "include": "source.c"
- }
- ]
- },
- {
- "begin": "(?<!--)\\[(=*)\\[",
- "beginCaptures": {
- "0": {
- "name": "punctuation.definition.string.begin.xmake"
- }
- },
- "end": "\\]\\1\\]",
- "endCaptures": {
- "0": {
- "name": "punctuation.definition.string.end.xmake"
- }
- },
- "name": "string.quoted.other.multiline.xmake"
- },
- {
- "captures": {
- "1": {
- "name": "punctuation.definition.comment.xmake"
- }
- },
- "match": "\\A(#!).*$\\n?",
- "name": "comment.line.shebang.xmake"
- },
- {
- "begin": "(^[ \\t]+)?(?=--)",
- "beginCaptures": {
- "1": {
- "name": "punctuation.whitespace.comment.leading.xmake"
- }
- },
- "end": "(?!\\G)((?!^)[ \\t]+\\n)?",
- "endCaptures": {
- "1": {
- "name": "punctuation.whitespace.comment.trailing.xmake"
- }
- },
- "patterns": [
- {
- "begin": "--\\[(=*)\\[",
- "beginCaptures": {
- "0": {
- "name": "punctuation.definition.comment.begin.xmake"
- }
- },
- "end": "\\]\\1\\]",
- "endCaptures": {
- "0": {
- "name": "punctuation.definition.comment.end.xmake"
- }
- },
- "name": "comment.block.xmake"
- },
- {
- "begin": "--",
- "beginCaptures": {
- "0": {
- "name": "punctuation.definition.comment.xmake"
- }
- },
- "end": "\\n",
- "name": "comment.line.double-dash.xmake"
- }
- ]
- },
- {
- "captures": {
- "1": {
- "name": "keyword.control.goto.xmake"
- },
- "2": {
- "name": "constant.other.placeholder.xmake"
- }
- },
- "match": "\\b(goto)\\s+([a-zA-Z_][a-zA-Z0-9_]*)"
- },
- {
- "captures": {
- "1": {
- "name": "punctuation.definition.label.begin.xmake"
- },
- "2": {
- "name": "punctuation.definition.label.end.xmake"
- }
- },
- "match": "(::)[a-zA-Z_][a-zA-Z0-9_]*(::)",
- "name": "constant.other.placeholder.xmake"
- },
- {
- "match": "\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|function|local|in)\\b",
- "name": "keyword.control.xmake"
- },
- {
- "match": "(?<![^.]\\.|:)\\b(false|nil|true|_G|_VERSION|math\\.(pi|huge))\\b|(?<![.])\\.{3}(?!\\.)",
- "name": "constant.language.xmake"
- },
- {
- "match": "(?<![^.]\\.|:)\\b(self)\\b",
- "name": "variable.language.self.xmake"
- },
- {
- "match": "(?<![^.]\\.|:)\\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\b(?=\\s*(?:[({\"']|\\[\\[))",
- "name": "support.function.xmake"
- },
- {
- "match": "(?<![^.]\\.|:)\\b(coroutine\\.(create|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\\.(concat|insert|maxn|remove|sort)|math\\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?)|io\\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\\.(cpath|loaded|loadlib|path|preload|seeall)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|traceback))\\b(?=\\s*(?:[({\"']|\\[\\[))",
- "name": "support.function.library.xmake"
- },
- {
- "match": "\\b(and|or|not)\\b",
- "name": "keyword.operator.xmake"
- },
- {
- "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[))",
- "name": "support.function.any-method.xmake"
- },
- {
- "match": "(?<=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)",
- "name": "variable.other.xmake"
- },
- {
- "match": "\\+|-|%|#|\\*|\\/|\\^|==?|~=|<=?|>=?|(?<!\\.)\\.{2}(?!\\.)",
- "name": "keyword.operator.xmake"
- }
- ],
- "repository": {
- "escaped_char": {
- "patterns": [
- {
- "match": "\\\\[abfnrtvz\\\\\"'\\n]",
- "name": "constant.character.escape.xmake"
- },
- {
- "match": "\\\\\\d{1,3}",
- "name": "constant.character.escape.byte.xmake"
- },
- {
- "match": "\\\\x[0-9A-Fa-f][0-9A-Fa-f]",
- "name": "constant.character.escape.byte.xmake"
- },
- {
- "match": "\\\\u\\{[0-9A-Fa-f]+\\}",
- "name": "constant.character.escape.unicode.xmake"
- },
- {
- "match": "\\\\.",
- "name": "invalid.illegal.character.escape.xmake"
- }
- ]
- }
- },
- "scopeName": "source.xmake",
- "uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7"
- }
|