{"name":"Luau","scopeName":"source.luau","patterns":[{"include":"#function-definition"},{"include":"#number"},{"include":"#string"},{"include":"#shebang"},{"include":"#comment"},{"include":"#local-declaration"},{"include":"#for-loop"},{"include":"#type-alias-declaration"},{"include":"#keyword"},{"include":"#language_constant"},{"include":"#standard_library"},{"include":"#identifier"},{"include":"#operator"},{"include":"#parentheses"},{"include":"#table"},{"include":"#type_cast"},{"include":"#type_annotation"},{"include":"#attribute"}],"repository":{"attribute":{"patterns":[{"name":"meta.attribute.luau","match":"(@)([a-zA-Z_][a-zA-Z0-9_]*)","captures":{"1":{"name":"keyword.operator.attribute.luau"},"2":{"name":"storage.type.attribute.luau"}}}]},"comment":{"patterns":[{"name":"comment.block.luau","begin":"--\\[(=*)\\[","end":"\\]\\1\\]","patterns":[{"name":"keyword.operator.other.luau","begin":"(```luau?)\\s+","end":"(```)","patterns":[{"include":"source.luau"}],"beginCaptures":{"1":{"name":"comment.luau"}},"endCaptures":{"1":{"name":"comment.luau"}}},{"include":"#doc_comment_tags"}]},{"name":"comment.line.double-dash.documentation.luau","begin":"---","end":"\\n","patterns":[{"include":"#doc_comment_tags"}]},{"name":"comment.line.double-dash.luau","begin":"--","end":"\\n"}]},"doc_comment_tags":{"patterns":[{"name":"storage.type.class.luadoc.luau","match":"@\\w+"},{"match":"((?\u003c=[\\s*!\\/])[\\\\@]param)(?:\\s)+(\\b\\w+\\b)","captures":{"1":{"name":"storage.type.class.luadoc.luau"},"2":{"name":"variable.parameter.luau"}}}]},"for-loop":{"begin":"\\b(for)\\b","end":"\\b(in)\\b|(=)","patterns":[{"begin":"(:)","end":"(?=\\s*in\\b|\\s*[=,]|\\s*$)","patterns":[{"include":"#type_literal"}],"beginCaptures":{"1":{"name":"keyword.operator.type.luau"}}},{"name":"variable.parameter.luau","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"}],"beginCaptures":{"1":{"name":"keyword.control.luau"}},"endCaptures":{"1":{"name":"keyword.control.luau"},"2":{"name":"keyword.operator.assignment.luau"}}},"function-definition":{"name":"meta.function.luau","begin":"\\b(?:(local)\\s+)?(function)\\b(?![,:])","end":"(?\u003c=[\\)\\-{}\\[\\]\"'])","patterns":[{"include":"#comment"},{"include":"#generics-declaration"},{"name":"meta.parameter.luau","begin":"(\\()","end":"(\\))","patterns":[{"include":"#comment"},{"name":"variable.parameter.function.varargs.luau","match":"\\.\\.\\."},{"name":"variable.parameter.function.luau","match":"[a-zA-Z_][a-zA-Z0-9_]*"},{"name":"punctuation.separator.arguments.luau","match":","},{"begin":":","end":"(?=[\\),])","patterns":[{"include":"#type_literal"}],"beginCaptures":{"0":{"name":"keyword.operator.type.luau"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.luau"}},"endCaptures":{"1":{"name":"punctuation.definition.parameters.end.luau"}}},{"name":"variable.language.metamethod.luau","match":"\\b(__add|__call|__concat|__div|__eq|__index|__le|__len|__lt|__metatable|__mod|__mode|__mul|__newindex|__pow|__sub|__tostring|__unm|__iter|__idiv)\\b"},{"name":"entity.name.function.luau","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.local.luau"},"2":{"name":"keyword.control.luau"}}},"generics-declaration":{"begin":"(\u003c)","end":"(\u003e)","patterns":[{"name":"entity.name.type.luau","match":"[a-zA-Z_][a-zA-Z0-9_]*"},{"name":"keyword.operator.assignment.luau","match":"="},{"include":"#type_literal"}]},"identifier":{"patterns":[{"name":"entity.name.function.luau","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[))"},{"name":"variable.other.property.luau","match":"(?\u003c=[^.]\\.|:)\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{"name":"variable.other.constant.luau","match":"\\b([A-Z_][A-Z0-9_]*)\\b"},{"name":"variable.other.readwrite.luau","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"}]},"interpolated_string_expression":{"name":"meta.template.expression.luau","contentName":"meta.embedded.line.luau","begin":"\\{","end":"\\}","patterns":[{"include":"source.luau"}],"beginCaptures":{"0":{"name":"punctuation.definition.interpolated-string-expression.begin.luau"}},"endCaptures":{"0":{"name":"punctuation.definition.interpolated-string-expression.end.luau"}}},"keyword":{"patterns":[{"name":"keyword.control.luau","match":"\\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|in|continue)\\b"},{"name":"storage.modifier.local.luau","match":"\\b(local)\\b"},{"name":"keyword.control.luau","match":"\\b(function)\\b(?![,:])"},{"name":"variable.language.self.luau","match":"(?\u003c![^.]\\.|:)\\b(self)\\b"},{"name":"keyword.operator.logical.luau keyword.operator.wordlike.luau","match":"\\b(and|or|not)\\b"},{"name":"variable.language.metamethod.luau","match":"(?\u003c=[^.]\\.|:)\\b(__add|__call|__concat|__div|__eq|__index|__le|__len|__lt|__metatable|__mod|__mode|__mul|__newindex|__pow|__sub|__tostring|__unm)\\b"},{"name":"keyword.other.unit.luau","match":"(?\u003c![.])\\.{3}(?!\\.)"}]},"language_constant":{"patterns":[{"name":"constant.language.boolean.false.luau","match":"(?\u003c![^.]\\.|:)\\b(false)\\b"},{"name":"constant.language.boolean.true.luau","match":"(?\u003c![^.]\\.|:)\\b(true)\\b"},{"name":"constant.language.nil.luau","match":"(?\u003c![^.]\\.|:)\\b(nil(?!:))\\b"}]},"local-declaration":{"begin":"\\b(local)\\b","end":"(?=\\s*do\\b|\\s*[=;]|\\s*$)","patterns":[{"include":"#comment"},{"include":"#attribute"},{"begin":"(:)","end":"(?=\\s*do\\b|\\s*[=;,]|\\s*$)","patterns":[{"include":"#type_literal"}],"beginCaptures":{"1":{"name":"keyword.operator.type.luau"}}},{"name":"variable.other.constant.luau","match":"\\b([A-Z_][A-Z0-9_]*)\\b"},{"name":"variable.other.readwrite.luau","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.local.luau"}}},"number":{"patterns":[{"name":"constant.numeric.hex.luau","match":"\\b0_*[xX]_*[\\da-fA-F_]*(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"},{"name":"constant.numeric.binary.luau","match":"\\b0_*[bB][01_]+(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"},{"name":"constant.numeric.decimal.luau","match":"(?:\\d[\\d_]*(?:\\.[\\d_]*)?|\\.\\d[\\d_]*)(?:[eE][\\+\\-]?_*\\d[\\d_]*(?:\\.[\\d_]*)?)?"}]},"operator":{"patterns":[{"name":"keyword.operator.comparison.luau","match":"==|~=|!=|\u003c=?|\u003e=?"},{"name":"keyword.operator.assignment.luau","match":"\\+=|-=|/=|//=|\\*=|%=|\\^=|\\.\\.=|="},{"name":"keyword.operator.arithmetic.luau","match":"\\+|-|%|\\*|\\/\\/|\\/|\\^"},{"name":"keyword.operator.other.luau","match":"#|(?\u003c!\\.)\\.{2}(?!\\.)"}]},"parentheses":{"begin":"(\\()","end":"(\\))","patterns":[{"name":"punctuation.separator.arguments.luau","match":","},{"include":"source.luau"}],"beginCaptures":{"1":{"name":"punctuation.arguments.begin.luau"}},"endCaptures":{"1":{"name":"punctuation.arguments.end.luau"}}},"shebang":{"name":"comment.line.shebang.luau","match":"\\A(#!).*$\\n?","captures":{"1":{"name":"punctuation.definition.comment.luau"}}},"standard_library":{"patterns":[{"name":"support.function.luau","match":"(?\u003c![^.]\\.|:)\\b(assert|collectgarbage|error|gcinfo|getfenv|getmetatable|ipairs|loadstring|newproxy|next|pairs|pcall|print|rawequal|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|typeof|unpack|xpcall)\\b"},{"name":"constant.language.luau","match":"(?\u003c![^.]\\.|:)\\b(_G|_VERSION)\\b"},{"name":"support.function.luau","match":"(?\u003c![^.]\\.|:)\\b(bit32\\.(?:arshift|band|bnot|bor|btest|bxor|extract|lrotate|lshift|replace|rrotate|rshift|countlz|countrz|byteswap)|coroutine\\.(?:create|isyieldable|resume|running|status|wrap|yield|close)|debug\\.(?:info|loadmodule|profilebegin|profileend|traceback)|math\\.(?:abs|acos|asin|atan|atan2|ceil|clamp|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|noise|pow|rad|random|randomseed|round|sign|sin|sinh|sqrt|tan|tanh)|os\\.(?:clock|date|difftime|time)|string\\.(?:byte|char|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|split|sub|unpack|upper)|table\\.(?:concat|create|find|foreach|foreachi|getn|insert|maxn|move|pack|remove|sort|unpack|clear|freeze|isfrozen|clone)|task\\.(?:spawn|synchronize|desynchronize|wait|defer|delay)|utf8\\.(?:char|codepoint|codes|graphemes|len|nfcnormalize|nfdnormalize|offset)|buffer\\.(?:create|fromstring|tostring|len|readi8|readu8|readi16|readu16|readi32|readu32|readf32|readf64|writei8|writeu8|writei16|writeu16|writei32|writeu32|writef32|writef64|readstring|writestring|copy|fill))\\b"},{"name":"support.constant.luau","match":"(?\u003c![^.]\\.|:)\\b(bit32|buffer|coroutine|debug|math(\\.(huge|pi))?|os|string|table|task|utf8(\\.charpattern)?)\\b"},{"name":"support.function.luau","match":"(?\u003c![^.]\\.|:)\\b(delay|DebuggerManager|elapsedTime|PluginManager|printidentity|settings|spawn|stats|tick|time|UserSettings|version|wait|warn)\\b"},{"name":"constant.language.luau","match":"(?\u003c![^.]\\.|:)\\b(game|plugin|shared|script|workspace|Enum(?:\\.\\w+){0,2})\\b"}]},"string":{"patterns":[{"name":"string.quoted.double.luau","begin":"\"","end":"\"","patterns":[{"include":"#string_escape"}]},{"name":"string.quoted.single.luau","begin":"'","end":"'","patterns":[{"include":"#string_escape"}]},{"name":"string.other.multiline.luau","begin":"\\[(=*)\\[","end":"\\]\\1\\]"},{"name":"string.interpolated.luau","begin":"`","end":"`","patterns":[{"include":"#interpolated_string_expression"},{"include":"#string_escape"}]}]},"string_escape":{"patterns":[{"name":"constant.character.escape.luau","match":"\\\\[abfnrtvz'\"`{\\\\]"},{"name":"constant.character.escape.luau","match":"\\\\\\d{1,3}"},{"name":"constant.character.escape.luau","match":"\\\\x[0-9a-fA-F]{2}"},{"name":"constant.character.escape.luau","match":"\\\\u\\{[0-9a-fA-F]*\\}"},{"name":"constant.character.escape.luau","match":"\\\\$"}]},"table":{"begin":"(\\{)","end":"(\\})","patterns":[{"name":"punctuation.separator.fields.luau","match":"[,;]"},{"include":"source.luau"}],"beginCaptures":{"1":{"name":"punctuation.table.begin.luau"}},"endCaptures":{"1":{"name":"punctuation.table.end.luau"}}},"type-alias-declaration":{"begin":"^\\b(?:(export)\\s+)?(type)\\b","end":"(?=\\s*$)|(?=\\s*;)","patterns":[{"include":"#type_literal"},{"name":"keyword.operator.assignment.luau","match":"="}],"beginCaptures":{"1":{"name":"storage.modifier.visibility.luau"},"2":{"name":"storage.type.luau"}}},"type_annotation":{"begin":":(?!\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(?:[({\"']|\\[\\[)))","end":"(?\u003c=\\))(?!\\s*-\u003e)|=|;|$|(?=\\breturn\\b)|(?=\\bend\\b)","patterns":[{"include":"#comment"},{"include":"#type_literal"}]},"type_cast":{"begin":"(::)","end":"(?=^|[;),}\\]:?\\-\\+\\\u003e](?!\\s*[\u0026\\|])|$|\\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|in|continue)\\b)","patterns":[{"include":"#type_literal"}],"beginCaptures":{"1":{"name":"keyword.operator.typecast.luau"}}},"type_literal":{"patterns":[{"include":"#comment"},{"include":"#string"},{"name":"keyword.operator.type.luau","match":"\\?|\\\u0026|\\|"},{"name":"keyword.operator.type.function.luau","match":"-\u003e"},{"name":"constant.language.boolean.false.luau","match":"\\b(false)\\b"},{"name":"constant.language.boolean.true.luau","match":"\\b(true)\\b"},{"name":"support.type.primitive.luau","match":"\\b(nil|string|number|boolean|thread|userdata|symbol|any)\\b"},{"begin":"\\b(typeof)\\b(\\()","end":"(\\))","patterns":[{"include":"source.luau"}],"beginCaptures":{"1":{"name":"support.function.luau"},"2":{"name":"punctuation.arguments.begin.typeof.luau"}},"endCaptures":{"1":{"name":"punctuation.arguments.end.typeof.luau"}}},{"begin":"(\u003c)","end":"(\u003e)","patterns":[{"name":"keyword.operator.assignment.luau","match":"="},{"include":"#type_literal"}],"beginCaptures":{"1":{"name":"punctuation.definition.typeparameters.begin.luau"}},"endCaptures":{"1":{"name":"punctuation.definition.typeparameters.end.luau"}}},{"name":"entity.name.type.luau","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{"begin":"\\{","end":"\\}","patterns":[{"begin":"\\[","end":"\\]","patterns":[{"include":"#type_literal"}]},{"match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(:)","captures":{"1":{"name":"variable.property.luau"},"2":{"name":"keyword.operator.type.luau"}}},{"include":"#type_literal"},{"name":"punctuation.separator.fields.type.luau","match":"[,;]"}]},{"begin":"\\(","end":"\\)","patterns":[{"name":"variable.parameter.luau","match":"\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(:)","captures":{"1":{"name":"variable.parameter.luau"},"2":{"name":"keyword.operator.type.luau"}}},{"include":"#type_literal"}]}]}}}