{"name":"Zig","scopeName":"source.zig","patterns":[{"include":"#dummy_main"}],"repository":{"block":{"begin":"([a-zA-Z_][\\w.]*|@\\\".+\\\")?\\s*(\\{)","end":"(\\})","patterns":[{"include":"#dummy_main"}],"beginCaptures":{"1":{"name":"storage.type.zig"},"2":{"name":"punctuation.section.braces.begin.zig"}},"endCaptures":{"1":{"name":"punctuation.section.braces.end.zig"}}},"character_escapes":{"patterns":[{"name":"constant.character.escape.newline.zig","match":"\\\\n"},{"name":"constant.character.escape.carrigereturn.zig","match":"\\\\r"},{"name":"constant.character.escape.tabulator.zig","match":"\\\\t"},{"name":"constant.character.escape.backslash.zig","match":"\\\\\\\\"},{"name":"constant.character.escape.single-quote.zig","match":"\\\\'"},{"name":"constant.character.escape.double-quote.zig","match":"\\\\\\\""},{"name":"constant.character.escape.hexidecimal.zig","match":"\\\\x[a-fA-F\\d]{2}"},{"name":"constant.character.escape.hexidecimal.zig","match":"\\\\u\\{[a-fA-F\\d]{1,6}\\}"}]},"comments":{"patterns":[{"name":"comment.line.documentation.zig","begin":"///","end":"$\\n?"},{"name":"comment.line.todo.zig","begin":"//[^/]\\s*TODO","end":"$\\n?"},{"name":"comment.line.zig","begin":"//[^/]*","end":"$\\n?"}]},"constants":{"patterns":[{"name":"constant.language.zig","match":"\\b(null|undefined|true|false)\\b"},{"name":"constant.numeric.integer.zig","match":"\\b(?\u003c!\\.)(-?[\\d_]+)(?!\\.)\\b"},{"name":"constant.numeric.integer.hexadecimal.zig","match":"\\b(?\u003c!\\.)(0x[a-fA-F\\d_]+)(?!\\.)\\b"},{"name":"constant.numeric.integer.octal.zig","match":"\\b(?\u003c!\\.)(0o[0-7_]+)(?!\\.)\\b"},{"name":"constant.numeric.integer.binary.zig","match":"\\b(?\u003c!\\.)(0b[01_]+)(?!\\.)\\b"},{"name":"constant.numeric.float.zig","match":"(?\u003c!\\.)(-?\\b[\\d_]+(?:\\.[\\d_]+)?(?:[eE][+-]?[\\d_]+)?)(?!\\.)\\b"},{"name":"constant.numeric.float.hexadecimal.zig","match":"(?\u003c!\\.)(-?\\b0x[a-fA-F\\d_]+(?:\\.[a-fA-F\\d_]+)?[pP]?(?:[+-]?[\\d_]+)?)(?!\\.)\\b"}]},"container_decl":{"patterns":[{"name":"entity.name.union.zig","match":"\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")?(?=\\s*=\\s*(?:extern|packed)?\\b\\s*(?:union)\\s*[(\\{])"},{"name":"entity.name.struct.zig","match":"\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")?(?=\\s*=\\s*(?:extern|packed)?\\b\\s*(?:struct)\\s*[(\\{])"},{"name":"entity.name.enum.zig","match":"\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")?(?=\\s*=\\s*(?:extern|packed)?\\b\\s*(?:enum)\\s*[(\\{])"},{"name":"entity.name.error.zig","match":"\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")?(?=\\s*=\\s*(?:error)\\s*[(\\{])"},{"match":"\\b(error)(\\.)([a-zA-Z_]\\w*|@\\\".+\\\")","captures":{"1":{"name":"storage.type.error.zig"},"2":{"name":"punctuation.accessor.zig"},"3":{"name":"entity.name.error.zig"}}}]},"dummy_main":{"patterns":[{"include":"#label"},{"include":"#function_type"},{"include":"#punctuation"},{"include":"#storage_modifier"},{"include":"#container_decl"},{"include":"#constants"},{"include":"#comments"},{"include":"#strings"},{"include":"#storage"},{"include":"#keywords"},{"include":"#operators"},{"include":"#support"},{"include":"#field_decl"},{"include":"#block"},{"include":"#function_def"},{"include":"#function_call"},{"include":"#enum_literal"}]},"enum_literal":{"name":"constant.language.enum","match":"(?\u003c!\\w|\\)|\\?|\\}|\\]|\\*)(\\.(?:[a-zA-Z_]\\w*\\b|@\\\"[^\\\"]*\\\"))(?!\\(|\\s*=[^=\u003e])"},"field_decl":{"begin":"([a-zA-Z_]\\w*|@\\\".+\\\")\\s*(:)\\s*","end":"([a-zA-Z_][\\w.]*|@\\\".+\\\")?\\s*(?:(,)|(=)|$)","patterns":[{"include":"#dummy_main"}],"beginCaptures":{"1":{"name":"variable.other.member.zig"},"2":{"name":"punctuation.separator.zig"}},"endCaptures":{"1":{"name":"storage.type.zig"},"2":{"name":"punctuation.separator.zig"},"3":{"name":"keyword.operator.assignment.zig"}}},"function_call":{"name":"variable.function.zig","match":"(?\u003c!fn)\\b([a-zA-Z_]\\w*|@\\\".+\\\")(?=\\s*\\()"},"function_def":{"begin":"(?\u003c=fn)\\s+([a-zA-Z_]\\w*|@\\\".+\\\")(\\()","end":"(?\u003c=\\)[^\\)])\\s*([a-zA-Z_][\\w.]*|@\\\".+\\\")?(!)?\\s*(?:([a-zA-Z_][\\w.]*|@\\\".+\\\")\\b(?!\\s*\\())?","patterns":[{"include":"#label"},{"include":"#param_list"},{"name":"storage.type.zig","match":"([a-zA-Z_][\\w.]*|@\\\".+\\\")"},{"include":"#dummy_main"}],"beginCaptures":{"1":{"name":"entity.name.function"},"2":{"name":"punctuation.section.parens.begin.zig"}},"endCaptures":{"1":{"name":"storage.type.zig"},"2":{"name":"keyword.operator.zig"},"3":{"name":"storage.type.zig"}}},"function_type":{"contentName":"meta.function.parameters.zig","begin":"\\b(fn)\\s*(\\()","end":"(?\u003c=\\)|\\})\\s*([a-zA-Z_][\\w.]*|@\\\".+\\\")?\\s*(!)?\\s*([a-zA-Z_][\\w.]*|@\\\".+\\\")","patterns":[{"include":"#label"},{"include":"#param_list"},{"name":"storage.type.zig","match":"([a-zA-Z_][\\w.]*|@\\\".+\\\")"},{"include":"#dummy_main"}],"beginCaptures":{"1":{"name":"storage.type.function.zig"},"2":{"name":"punctuation.section.parens.begin.zig"}},"endCaptures":{"1":{"name":"storage.type.zig"},"2":{"name":"keyword.operator.zig"},"3":{"name":"storage.type.zig"}}},"keywords":{"patterns":[{"name":"keyword.control.zig","match":"\\b(while|for|break|return|continue|asm|defer|errdefer|unreachable)\\b"},{"name":"keyword.control.async.zig","match":"\\b(async|await|suspend|nosuspend|resume)\\b"},{"name":"keyword.control.conditional.zig","match":"\\b(if|else|switch|try|catch|orelse)\\b"},{"name":"keyword.control.import.zig","match":"(?\u003c!\\w)(@import|@cImport|@cInclude)\\b"},{"name":"keyword.other.usingnamespace.zig","match":"\\b(usingnamespace)\\b"}]},"label":{"match":"\\b(break|continue)\\s*:\\s*([a-zA-Z_]\\w*|@\\\".+\\\")\\b|\\b(?!\\d)([a-zA-Z_]\\w*|@\\\".+\\\")\\b(?=\\s*:\\s*(?:\\{|while\\b))","captures":{"1":{"name":"keyword.control.zig"},"2":{"name":"entity.name.label.zig"},"3":{"name":"entity.name.label.zig"}}},"operators":{"patterns":[{"name":"keyword.operator.zig","match":"\\b!\\b"},{"name":"keyword.operator.logical.zig","match":"(==|(?:!|\u003e|\u003c)=?)"},{"name":"keyword.operator.word.zig","match":"\\b(and|or)\\b"},{"name":"keyword.operator.assignment.zig","match":"((?:(?:\\+|-|\\*)\\%?|/|%|\u003c\u003c|\u003e\u003e|\u0026|\\|(?=[^\\|])|\\^)?=)"},{"name":"keyword.operator.arithmetic.zig","match":"((?:\\+|-|\\*)\\%?|/(?!/)|%)"},{"name":"keyword.operator.bitwise.zig","match":"(\u003c\u003c|\u003e\u003e|\u0026(?=[a-zA-Z_]|@\\\")|\\|(?=[^\\|])|\\^|~)"},{"name":"keyword.operator.other.zig","match":"(\\+\\+|\\*\\*|-\u003e|\\.\\?|\\.\\*|\u0026(?=[a-zA-Z_]|@\\\")|\\?|\\|\\||\\.{2,3})"}]},"param_list":{"begin":"([a-zA-Z_]\\w*|@\\\".+\\\")\\s*(:)\\s*","end":"([a-zA-Z_][\\w.]*|@\\\".+\\\")?\\s*(?:(,)|(\\)))","patterns":[{"include":"#dummy_main"},{"name":"storage.type.zig","match":"([a-zA-Z_][\\w.]*|@\\\".+\\\")"}],"beginCaptures":{"1":{"name":"variable.parameter.zig"},"2":{"name":"punctuation.separator.zig"}},"endCaptures":{"1":{"name":"storage.type.zig"},"2":{"name":"punctuation.separator.zig"},"3":{"name":"punctuation.section.parens.end.zig"}}},"punctuation":{"patterns":[{"name":"punctuation.separator.zig","match":","},{"name":"punctuation.terminator.zig","match":";"},{"name":"punctuation.section.parens.begin.zig","match":"(\\()"},{"name":"punctuation.section.parens.end.zig","match":"(\\))"}]},"storage":{"patterns":[{"name":"storage.type.zig","match":"\\b(bool|void|noreturn|type|anyerror|anytype)\\b"},{"name":"storage.type.integer.zig","match":"\\b(?\u003c!\\.)([iu]\\d+|[iu]size|comptime_int)\\b"},{"name":"storage.type.float.zig","match":"\\b(f16|f32|f64|f128|comptime_float)\\b"},{"name":"storage.type.c_compat.zig","match":"\\b(c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble|c_void)\\b"},{"match":"\\b(anyframe)\\b\\s*(-\u003e)?\\s*(?:([a-zA-Z_][\\w.]*|@\\\".+\\\")\\b(?!\\s*\\())?","captures":{"1":{"name":"storage.type.zig"},"2":{"name":"keyword.operator.zig"},"3":{"name":"storage.type.zig"}}},{"name":"storage.type.function.zig","match":"\\bfn\\b"},{"name":"storage.type.test.zig","match":"\\btest\\b"},{"name":"storage.type.struct.zig","match":"\\bstruct\\b"},{"name":"storage.type.enum.zig","match":"\\benum\\b"},{"name":"storage.type.union.zig","match":"\\bunion\\b"},{"name":"storage.type.error.zig","match":"\\berror\\b"}]},"storage_modifier":{"name":"storage.modifier.zig","match":"\\b(const|var|extern|packed|export|pub|noalias|inline|noinline|comptime|volatile|align|linksection|threadlocal|allowzero)\\b"},"strings":{"patterns":[{"name":"string.quoted.single.zig","begin":"\\'","end":"\\'","patterns":[{"include":"#character_escapes"},{"name":"invalid.illegal.character.zig","match":"\\\\[^\\'][^\\']*?"}]},{"name":"string.quoted.double.zig","begin":"c?\\\"","end":"\\\"","patterns":[{"include":"#character_escapes"},{"name":"invalid.illegal.character.zig","match":"\\\\[^\\'][^\\']*?"}]},{"name":"string.quoted.other.zig","begin":"c?\\\\\\\\","end":"$\\n?"}]},"support":{"name":"support.function.zig","match":"(?\u003c!\\w)@[^\\\"\\d][a-zA-Z_]\\w*\\b"}}}