{ "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/1483add845ebfb3e1e631fe372603e5fed2cdd42", "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": "#emmydoc.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": { "0": { "name": "storage.type.attribute.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)\\b", "name": "keyword.local.lua" }, { "match": "\\b(function)\\b(?![,:])", "name": "keyword.control.lua" }, { "match": "(?=?|(?|\\<", "name": "keyword.operator.lua" } ] }, { "begin": "(?<=---)[ \\t]*@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": "(?<=---)[ \\t]*@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": "(?<=---)[ \\t]*@module", "beginCaptures": { "0": { "name": "storage.type.annotation.lua" } }, "end": "(?=[\\n@#])", "patterns": [ { "include": "#string" } ] }, { "match": "(?<=---)[ \\t]*@(async|nodiscard)", "name": "storage.type.annotation.lua" }, { "begin": "(?<=---)\\|\\s*[\\>\\+]?", "beginCaptures": { "0": { "name": "storage.type.annotation.lua" } }, "end": "(?=[\\n@#])", "patterns": [ { "include": "#string" } ] } ] }, "emmydoc.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_\\.\\*\\[\\]\\<\\>\\,\\-]+)(?