{"name":"Lua","scopeName":"source.lua","patterns":[{"name":"meta.function.lua","begin":"\\b(?:(local)\\s+)?(function)\\b(?![,:])","end":"(?\u003c=[\\)\\-{}\\[\\]\"'])","patterns":[{"include":"#comment"},{"name":"meta.parameter.lua","begin":"(\\()","end":"(\\))|(?=[\\-\\.{}\\[\\]\"'])","patterns":[{"include":"#comment"},{"name":"variable.parameter.function.lua","match":"[a-zA-Z_][a-zA-Z0-9_]*"},{"name":"punctuation.separator.arguments.lua","match":","},{"begin":":","end":"(?=[\\),])","patterns":[{"include":"#emmydoc.type"}],"beginCaptures":{"0":{"name":"punctuation.separator.arguments.lua"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.lua"}},"endCaptures":{"1":{"name":"punctuation.definition.parameters.finish.lua"}}},{"name":"entity.name.class.lua","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=:)"},{"name":"entity.name.function.lua","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"}],"beginCaptures":{"1":{"name":"keyword.local.lua"},"2":{"name":"keyword.control.lua"}}},{"name":"constant.numeric.float.hexadecimal.lua","match":"(?\u003c![\\w\\d.])0[xX][0-9A-Fa-f]+(\\.[0-9A-Fa-f]*)?([eE]-?\\d*)?([pP][-+]\\d+)?"},{"name":"constant.numeric.float.hexadecimal.lua","match":"(?\u003c![\\w\\d.])0[xX]\\.[0-9A-Fa-f]+([eE]-?\\d*)?([pP][-+]\\d+)?"},{"name":"constant.numeric.integer.hexadecimal.lua","match":"(?\u003c![\\w\\d.])0[xX][0-9A-Fa-f]+(?![pPeE.0-9])"},{"name":"constant.numeric.float.lua","match":"(?\u003c![\\w\\d.])\\d+(\\.\\d*)?([eE]-?\\d*)?"},{"name":"constant.numeric.float.lua","match":"(?\u003c![\\w\\d.])\\.\\d+([eE]-?\\d*)?"},{"name":"constant.numeric.integer.lua","match":"(?\u003c![\\w\\d.])\\d+(?![pPeE.0-9])"},{"include":"#string"},{"name":"comment.line.shebang.lua","match":"\\A(#!).*$\\n?","captures":{"1":{"name":"punctuation.definition.comment.lua"}}},{"include":"#comment"},{"match":"\\b(goto)\\s+([a-zA-Z_][a-zA-Z0-9_]*)","captures":{"1":{"name":"keyword.control.goto.lua"},"2":{"name":"string.tag.lua"}}},{"name":"string.tag.lua","match":"(::)\\s*[a-zA-Z_][a-zA-Z0-9_]*\\s*(::)","captures":{"1":{"name":"punctuation.section.embedded.begin.lua"},"2":{"name":"punctuation.section.embedded.end.lua"}}},{"match":"\u003c\\s*(const|close)\\s*\u003e","captures":{"1":{"name":"string.tag.lua"}}},{"name":"storage.type.generic.lua","match":"\\\u003c[a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*\\\u003e"},{"name":"keyword.control.lua","match":"\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\\b"},{"name":"keyword.local.lua","match":"\\b(local|global)\\b"},{"name":"keyword.control.lua","match":"\\b(function)\\b(?![,:])"},{"name":"constant.language.lua","match":"(?\u003c![^.]\\.|:)\\b(false|nil(?!:)|true|_ENV|_G|_VERSION|math\\.(pi|huge|maxinteger|mininteger)|utf8\\.charpattern|io\\.(stdin|stdout|stderr)|package\\.(config|cpath|loaded|loaders|path|preload|searchers))\\b|(?\u003c![.])\\.{3}(?!\\.)"},{"name":"variable.language.self.lua","match":"(?\u003c![^.]\\.|:)\\b(self)\\b"},{"name":"support.function.lua","match":"(?\u003c![^.]\\.|:)\\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\b(?!\\s*=(?!=))"},{"name":"entity.name.tag.lua","match":"(?\u003c![^.]\\.|:)\\b(async)\\b(?!\\s*=(?!=))"},{"name":"support.function.library.lua","match":"(?\u003c![^.]\\.|:)\\b(coroutine\\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\\.(concat|insert|maxn|move|pack|remove|sort|unpack)|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?|tointeger|type)|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\\.(loadlib|seeall|searchpath)|debug\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\\.(char|codes|codepoint|len|offset))\\b(?!\\s*=(?!=))"},{"name":"keyword.operator.lua","match":"\\b(and|or|not|\\|\\||\\\u0026\\\u0026|\\!)\\b"},{"name":"support.function.any-method.lua","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(?=\\s*\\??:)"},{"name":"entity.other.attribute.lua","match":"(?\u003c=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*=\\s*\\b(function)\\b)"},{"name":"variable.other.lua","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*=\\s*\\b(function)\\b)"},{"name":"entity.name.function.lua","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*=\\s*\\b(function)\\b)"},{"name":"keyword.operator.lua","match":"\\+|-|%|#|\\*|\\/|\\^|==?|~=|!=|\u003c=?|\u003e=?|(?\u003c!\\.)\\.{2}(?!\\.)"}],"repository":{"comment":{"patterns":[{"begin":"(^[ \\t]+)?(?=--)","end":"(?!\\G)((?!^)[ \\t]+\\n)?","patterns":[{"begin":"--\\[(=*)\\[@@@","end":"\\]\\1\\]","patterns":[{"include":"source.lua"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}}},{"name":"comment.block.lua","begin":"--\\[(=*)\\[","end":"\\]\\1\\]","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}}},{"name":"comment.line.double-dash.lua","begin":"----","end":"\\n","beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}}},{"name":"comment.line.double-dash.documentation.lua","begin":"---","end":"\\n","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}}},{"name":"comment.line.double-dash.lua","begin":"--","end":"\\n","patterns":[{"include":"#ldoc_tag"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}}}],"beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.lua"}},"endCaptures":{"1":{"name":"punctuation.whitespace.comment.trailing.lua"}}},{"name":"comment.block.lua","begin":"\\/\\*","end":"\\*\\/","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}}}]},"emmydoc":{"patterns":[{"end":"(?=[\\n@#])","patterns":[{"name":"support.class.lua","match":"\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)"},{"name":"keyword.operator.lua","match":":|,"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"begin":"\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)","end":"(?=\\n)","beginCaptures":{"0":{"name":"variable.lua"}}}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"include":"#emmydoc.type"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"begin":"\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)","end":"(?=[\\n#])","patterns":[{"include":"#emmydoc.type"}],"beginCaptures":{"0":{"name":"variable.lua"}}}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"include":"#emmydoc.type"}],"beginCaptures":{"1":{"name":"storage.type.annotation.lua"},"2":{"name":"support.function.library.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"begin":"\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)","end":"(?=\\n)","patterns":[{"include":"#emmydoc.type"},{"name":"keyword.operator.lua","match":"([+-|])"}],"beginCaptures":{"0":{"name":"variable.other.lua"}}}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"begin":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(\\??)","end":"(?=[\\n#])","patterns":[{"include":"#emmydoc.type"}],"beginCaptures":{"1":{"name":"entity.name.variable.lua"},"2":{"name":"keyword.operator.lua"}}}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"name":"keyword.operator.lua","match":"\\?"},{"include":"#emmydoc.type"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"begin":"(\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b|(\\[))(\\??)","end":"(?=[\\n#])","patterns":[{"include":"#string"},{"include":"#emmydoc.type"},{"name":"keyword.operator.lua","match":"\\]"}],"beginCaptures":{"2":{"name":"entity.name.variable.lua"},"3":{"name":"keyword.operator.lua"}}}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"begin":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b","end":"(?=\\n)|(,)","patterns":[{"name":"keyword.operator.lua","match":":"},{"include":"#emmydoc.type"}],"beginCaptures":{"0":{"name":"storage.type.generic.lua"}},"endCaptures":{"0":{"name":"keyword.operator.lua"}}}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"include":"#emmydoc.type"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"include":"#emmydoc.type"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"name":"support.class.lua","match":"\\b(5\\.1|5\\.2|5\\.3|5\\.4|JIT)\\b"},{"name":"keyword.operator.lua","match":",|\\\u003e|\\\u003c"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"name":"support.class.lua","match":"\\b([a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*)"},{"name":"keyword.operator.lua","match":"#"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"begin":"([a-zA-Z_\\-0-9]+)[ \\t]*(:)?","end":"(?=\\n)","patterns":[{"name":"support.class.lua","match":"\\b([a-zA-Z_\\*][a-zA-Z0-9_\\-]*)"},{"name":"keyword.operator.lua","match":","}],"beginCaptures":{"1":{"name":"keyword.other.unit"},"2":{"name":"keyword.operator.unit"}}}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"end":"(?=[\\n@#])","patterns":[{"include":"#string"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}},{"name":"storage.type.annotation.lua"},{"begin":"(?\u003c=---)\\|\\s*[\\\u003e\\+]?","end":"(?=[\\n@#])","patterns":[{"include":"#string"}],"beginCaptures":{"0":{"name":"storage.type.annotation.lua"}}}]},"emmydoc.type":{"patterns":[{"begin":"\\bfun\\b","end":"(?=[\\s#])","patterns":[{"name":"keyword.operator.lua","match":"[\\(\\),:\\?][ \\t]*"},{"name":"entity.name.variable.lua","match":"([a-zA-Z_][a-zA-Z0-9_\\.\\*\\[\\]\\\u003c\\\u003e\\,\\-]*)(?\u003c!,)[ \\t]*(?=\\??:)"},{"include":"#emmydoc.type"},{"include":"#string"}],"beginCaptures":{"0":{"name":"keyword.control.lua"}}},{"name":"storage.type.generic.lua","match":"\\\u003c[a-zA-Z_\\*][a-zA-Z0-9_\\.\\*\\-]*\\\u003e"},{"name":"entity.name.tag.lua","match":"\\basync\\b"},{"name":"keyword.operator.lua","match":"[\\{\\}\\:\\,\\?\\|\\`][ \\t]*"},{"begin":"(?=[a-zA-Z_\\.\\*\"'\\[])","end":"(?=[\\s\\)\\,\\?\\:\\}\\|#])","patterns":[{"name":"support.type.lua","match":"([a-zA-Z0-9_\\.\\*\\[\\]\\\u003c\\\u003e\\,\\-]+)(?\u003c!,)[ \\t]*"},{"name":"constant.language.lua","match":"(\\.\\.\\.)[ \\t]*"},{"include":"#string"}]}]},"escaped_char":{"patterns":[{"name":"constant.character.escape.lua","match":"\\\\[abfnrtv\\\\\"'\\n]"},{"name":"constant.character.escape.lua","match":"\\\\z[\\n\\t ]*"},{"name":"constant.character.escape.byte.lua","match":"\\\\\\d{1,3}"},{"name":"constant.character.escape.byte.lua","match":"\\\\x[0-9A-Fa-f][0-9A-Fa-f]"},{"name":"constant.character.escape.unicode.lua","match":"\\\\u\\{[0-9A-Fa-f]+\\}"},{"name":"invalid.illegal.character.escape.lua","match":"\\\\."}]},"ldoc_tag":{"match":"\\G[ \\t]*(@)(alias|annotation|author|charset|class|classmod|comment|constructor|copyright|description|example|export|factory|field|file|fixme|function|include|lfunction|license|local|module|name|param|pragma|private|raise|release|return|script|section|see|set|static|submodule|summary|tfield|thread|tparam|treturn|todo|topic|type|usage|warning|within)\\b","captures":{"1":{"name":"punctuation.definition.block.tag.ldoc"},"2":{"name":"storage.type.class.ldoc"}}},"string":{"patterns":[{"name":"string.quoted.single.lua","begin":"'","end":"'[ \\t]*|(?=\\n)","patterns":[{"include":"#escaped_char"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}}},{"name":"string.quoted.double.lua","begin":"\"","end":"\"[ \\t]*|(?=\\n)","patterns":[{"include":"#escaped_char"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}}},{"name":"string.quoted.double.lua","begin":"`","end":"`[ \\t]*|(?=\\n)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}}},{"contentName":"meta.embedded.lua","begin":"(?\u003c=\\.cdef)\\s*(\\[(=*)\\[)","end":"(\\]\\2\\])[ \\t]*","patterns":[{"include":"source.c"}],"beginCaptures":{"0":{"name":"string.quoted.other.multiline.lua"},"1":{"name":"punctuation.definition.string.begin.lua"}},"endCaptures":{"0":{"name":"string.quoted.other.multiline.lua"},"1":{"name":"punctuation.definition.string.end.lua"}}},{"name":"string.quoted.other.multiline.lua","begin":"(?\u003c!--)\\[(=*)\\[","end":"\\]\\1\\][ \\t]*","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}}}]}}}