{ "information_for_contributors": [ "This file has been converted from https://github.com/sumneko/lua.tmbundle/blob/master/Syntaxes/Lua.plist", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/sumneko/lua.tmbundle/commit/57be7c5cf8fa173f5f39806822725e503932ab45", "name": "Lua", "scopeName": "source.lua", "patterns": [ { "begin": "\\b(?:(local)\\s+)?(function)\\b(?![,:])", "beginCaptures": { "1": { "name": "keyword.local.lua" }, "2": { "name": "keyword.control.lua" } }, "end": "(?<=[\\)\\-{}\\[\\]\"'])", "name": "meta.function.lua", "patterns": [ { "include": "#comment" }, { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.definition.parameters.begin.lua" } }, "end": "(\\))|(?=[\\-\\.{}\\[\\]\"'])", "endCaptures": { "1": { "name": "punctuation.definition.parameters.finish.lua" } }, "name": "meta.parameter.lua", "patterns": [ { "include": "#comment" }, { "match": "[a-zA-Z_][a-zA-Z0-9_]*", "name": "variable.parameter.function.lua" }, { "match": ",", "name": "punctuation.separator.arguments.lua" }, { "begin": ":", "beginCaptures": { "0": { "name": "punctuation.separator.arguments.lua" } }, "end": "(?=[\\),])", "patterns": [ { "include": "#luadoc.type" } ] } ] }, { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=:)", "name": "entity.name.class.lua" }, { "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", "name": "entity.name.function.lua" } ] }, { "match": "(?", "captures": { "1": { "name": "string.tag.lua" } } }, { "match": "\\<[a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*\\>", "name": "storage.type.generic.lua" }, { "match": "\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\\b", "name": "keyword.control.lua" }, { "match": "\\b(local|global)\\b", "name": "keyword.local.lua" }, { "match": "\\b(function)\\b(?![,:])", "name": "keyword.control.lua" }, { "match": "(?=?|(?|\\<", "name": "keyword.operator.lua" } ] }, { "begin": "(?<=---\\s*)@see", "beginCaptures": { "0": { "name": "storage.type.annotation.lua" } }, "end": "(?=[\\n@#])", "patterns": [ { "match": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)", "name": "support.class.lua" }, { "match": "#", "name": "keyword.operator.lua" } ] }, { "begin": "(?<=---\\s*)@diagnostic", "beginCaptures": { "0": { "name": "storage.type.annotation.lua" } }, "end": "(?=[\\n@#])", "patterns": [ { "begin": "([a-zA-Z_\\-0-9]+)[ \\t]*(:)?", "beginCaptures": { "1": { "name": "keyword.other.unit" }, "2": { "name": "keyword.operator.unit" } }, "end": "(?=\\n)", "patterns": [ { "match": "\\b([a-zA-Z_\\*][a-zA-Z0-9_\\-]*)", "name": "support.class.lua" }, { "match": ",", "name": "keyword.operator.lua" } ] } ] }, { "begin": "(?<=---\\s*)@module", "beginCaptures": { "0": { "name": "storage.type.annotation.lua" } }, "end": "(?=[\\n@#])", "patterns": [ { "include": "#string" } ] }, { "match": "(?<=---\\s*)@(async|nodiscard)", "name": "storage.type.annotation.lua" }, { "begin": "(?<=---)\\|\\s*[\\>\\+]?", "beginCaptures": { "0": { "name": "storage.type.annotation.lua" } }, "end": "(?=[\\n@#])", "patterns": [ { "include": "#string" } ] } ] }, "luadoc.type": { "patterns": [ { "begin": "\\bfun\\b", "beginCaptures": { "0": { "name": "keyword.control.lua" } }, "end": "(?=[\\s#])", "patterns": [ { "match": "[\\(\\),:\\?][ \\t]*", "name": "keyword.operator.lua" }, { "match": "([a-zA-Z_][a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]*)(?", "name": "storage.type.generic.lua" }, { "match": "\\basync\\b", "name": "entity.name.tag.lua" }, { "match": "[\\{\\}\\:\\,\\?\\|\\`][ \\t]*", "name": "keyword.operator.lua" }, { "begin": "(?=[a-zA-Z_\\.\\*\"'\\[])", "end": "(?=[\\s\\)\\,\\?\\:\\}\\|#])", "patterns": [ { "match": "([a-zA-Z0-9_\\.\\*\\[\\]\\<\\>\\,\\-]+)(?