{"name":"WIT","scopeName":"source.wit","patterns":[{"include":"#comment"},{"include":"#world"},{"include":"#interface"}],"repository":{"block-comments":{"patterns":[{"name":"comment.block.empty.wit","match":"/\\*\\*/"},{"name":"comment.block.documentation.wit","begin":"/\\*\\*","end":"\\*/","patterns":[{"include":"#block-comments"}]},{"name":"comment.block.wit","begin":"/\\*(?!\\*)","end":"\\*/","patterns":[{"include":"#block-comments"}]}]},"boolean":{"name":"entity.name.type.boolean.wit","match":"\\s*\\b(bool)\\b"},"comment":{"patterns":[{"include":"#block-comments"},{"include":"#doc-comment"},{"include":"#line-comment"}]},"container":{"name":"meta.container.ty.wit","patterns":[{"include":"#tuple"},{"include":"#list"},{"include":"#option"},{"include":"#result"},{"include":"#handle"}]},"doc-comment":{"name":"comment.line.documentation.wit","match":"^\\s*///.*"},"enum":{"name":"meta.enum-items.wit","begin":"\\s*\\b(enum)\\b\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"include":"#enum-cases"}],"beginCaptures":{"1":{"name":"keyword.other.enum.enum-items.wit"},"2":{"name":"entity.name.type.id.enum-items.wit"},"7":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}},"applyEndPatternLast":true},"enum-cases":{"name":"meta.enum-cases.wit","patterns":[{"include":"#comment"},{"name":"variable.other.enummember.id.enum-cases.wit","match":"\\s*\\b((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\b"},{"name":"punctuation.comma.wit","match":"\\s*(\\,)"}]},"extern":{"name":"meta.extern-type.wit","patterns":[{"name":"meta.interface-type.wit","patterns":[{"begin":"\\s*\\b(interface)\\b\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"include":"#interface-items"}],"beginCaptures":{"1":{"name":"keyword.other.interface.interface-type.wit"},"2":{"name":"ppunctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}}}]},{"include":"#function-definition"},{"include":"#use-path"}]},"flags":{"name":"meta.flags-items.wit","begin":"\\s*\\b(flags)\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"include":"#flags-fields"}],"beginCaptures":{"1":{"name":"keyword.other.flags.flags-items.wit"},"2":{"name":"entity.name.type.id.flags-items.wit"},"7":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}},"applyEndPatternLast":true},"flags-fields":{"name":"meta.flags-fields.wit","patterns":[{"include":"#comment"},{"name":"variable.other.enummember.id.flags-fields.wit","match":"\\s*\\b((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\b"},{"name":"punctuation.comma.wit","match":"\\s*(\\,)"}]},"function":{"name":"meta.func-item.wit","begin":"\\s*\\b(static\\s+)?((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\:)\\s*","end":"\\s*(?\u003c=\\n)","patterns":[{"include":"#function-definition"}],"beginCaptures":{"1":{"name":"storage.modifier.static.func-item.wit"},"2":{"name":"entity.name.function.id.func-item.wit"},"3":{"name":"meta.word.wit"},"5":{"name":"meta.word-separator.wit"},"6":{"name":"meta.word.wit"},"7":{"name":"keyword.operator.key-value.wit"}},"applyEndPatternLast":true},"function-definition":{"name":"meta.func-type.wit","patterns":[{"name":"meta.function.wit","begin":"\\s*\\b(func)\\b\\s*(\\()\\s*","end":"\\s*(\\))\\s*((\\-\\\u003e)(.+))?\\s*","patterns":[{"include":"#comment"},{"name":"meta.named-type-list.wit","begin":"\\s*\\b((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\b\\s*(\\:)\\s*","end":"\\s*(\\,)?\\s*","patterns":[{"include":"#comment"},{"name":"meta.types.named-type-list.wit","include":"#types"}],"beginCaptures":{"1":{"name":"variable.parameter.id.named-type.wit"},"6":{"name":"keyword.operator.key-value.wit"}},"endCaptures":{"1":{"name":"punctuation.comma.wit"}},"applyEndPatternLast":true}],"beginCaptures":{"1":{"name":"keyword.other.func.func-type.wit"},"2":{"name":"punctuation.brackets.round.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.round.end.wit"},"2":{"name":"meta.result-list.wit"},"3":{"name":"keyword.operator.arrow.skinny.wit"},"4":{"name":"meta.types.result-list.wit","patterns":[{"include":"#comment"},{"include":"#types"}]}},"applyEndPatternLast":true}]},"handle":{"name":"meta.handle.ty.wit","match":"\\s*\\b(borrow)\\b(\\\u003c)\\s*((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\\u003e)\\s*","captures":{"1":{"name":"entity.name.type.borrow.handle.wit"},"2":{"name":"punctuation.brackets.angle.begin.wit"},"3":{"name":"entity.name.type.id.handle.wit"},"8":{"name":"punctuation.brackets.angle.end.wit"}}},"identifier":{"name":"entity.name.type.id.wit","match":"\\s*\\b((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\b"},"interface":{"name":"meta.interface-item.wit","begin":"^\\b(default\\s+)?(interface)\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"include":"#interface-items"}],"beginCaptures":{"1":{"name":"storage.modifier.default.interface-item.wit"},"2":{"name":"keyword.declaration.interface.interface-item.wit storage.type.wit"},"3":{"name":"entity.name.type.id.interface-item.wit"},"8":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}}},"interface-items":{"name":"meta.interface-items.wit","patterns":[{"include":"#typedef-item"},{"include":"#use"},{"include":"#function"}]},"line-comment":{"name":"comment.line.double-slash.wit","match":"\\s*//.*"},"list":{"name":"meta.list.ty.wit","begin":"\\s*\\b(list)\\b(\\\u003c)\\s*","end":"\\s*(\\\u003e)\\s*","patterns":[{"include":"#comment"},{"name":"meta.types.list.wit","include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.list.wit"},"2":{"name":"punctuation.brackets.angle.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.angle.end.wit"}},"applyEndPatternLast":true},"numeric":{"name":"entity.name.type.numeric.wit","match":"\\s*\\b(u8|u16|u32|u64|s8|s16|s32|s64|float32|float64)\\b"},"operator":{"patterns":[{"name":"punctuation.equal.wit","match":"\\="},{"name":"punctuation.comma.wit","match":"\\,"},{"name":"keyword.operator.key-value.wit","match":"\\:"},{"name":"punctuation.semicolon.wit","match":"\\;"},{"name":"punctuation.brackets.round.begin.wit","match":"\\("},{"name":"punctuation.brackets.round.end.wit","match":"\\)"},{"name":"punctuation.brackets.curly.begin.wit","match":"\\{"},{"name":"punctuation.brackets.curly.end.wit","match":"\\}"},{"name":"punctuation.brackets.angle.begin.wit","match":"\\\u003c"},{"name":"punctuation.brackets.angle.end.wit","match":"\\\u003e"},{"name":"keyword.operator.star.wit","match":"\\*"},{"name":"keyword.operator.arrow.skinny.wit","match":"\\-\\\u003e"}]},"option":{"name":"meta.option.ty.wit","begin":"\\s*\\b(option)\\b(\\\u003c)\\s*","end":"\\s*(\\\u003e)\\s*","patterns":[{"include":"#comment"},{"name":"meta.types.option.wit","include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.option.wit"},"2":{"name":"punctuation.brackets.angle.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.angle.end.wit"}},"applyEndPatternLast":true},"primitive":{"name":"meta.primitive.ty.wit","patterns":[{"include":"#numeric"},{"include":"#boolean"},{"include":"#string"}]},"record":{"name":"meta.record-item.wit","begin":"\\s*\\b(record)\\b\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"include":"#record-fields"}],"beginCaptures":{"1":{"name":"keyword.declaration.record.record-item.wit"},"2":{"name":"entity.name.type.id.record-item.wit"},"7":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}},"applyEndPatternLast":true},"record-fields":{"name":"meta.record-fields.wit","begin":"\\s*\\b((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\b\\s*(\\:)\\s*","end":"\\s*(\\,)?\\s*","patterns":[{"include":"#comment"},{"name":"meta.types.record-fields.wit","include":"#types"}],"beginCaptures":{"1":{"name":"variable.declaration.id.record-fields.wit"},"6":{"name":"keyword.operator.key-value.wit"}},"endCaptures":{"1":{"name":"punctuation.comma.wit"}},"applyEndPatternLast":true},"resource":{"name":"meta.resource.wit","begin":"\\s*\\b(resource)\\b\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"include":"#function"}],"beginCaptures":{"1":{"name":"keyword.other.resource.wit"},"2":{"name":"entity.name.type.id.resource.wit"},"7":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}}},"result":{"name":"meta.result.ty.wit","begin":"\\s*\\b(result)\\b(\\\u003c)?\\s*","end":"\\s*(\\\u003e)?\\s*","patterns":[{"include":"#comment"},{"name":"variable.other.inferred-type.result.wit","match":"\\s*(?\u003c!\\w)(\\_)(?!\\w)"},{"name":"meta.types.result.wit","include":"#types"},{"name":"punctuation.comma.wit","match":"\\s*(\\,)"}],"beginCaptures":{"1":{"name":"entity.name.type.result.wit"},"2":{"name":"punctuation.brackets.angle.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.angle.end.wit"}},"applyEndPatternLast":true},"string":{"name":"entity.name.type.string.wit","match":"\\s*\\b(string|char)\\b"},"tuple":{"name":"meta.tuple.ty.wit","begin":"\\s*\\b(tuple)\\b(\\\u003c)\\s*","end":"\\s*(\\\u003e)\\s*","patterns":[{"include":"#comment"},{"patterns":[{"name":"meta.types.tuple.wit","include":"#types"},{"name":"punctuation.comma.wit","match":"\\s*(\\,)"}]}],"beginCaptures":{"1":{"name":"entity.name.type.tuple.wit"},"2":{"name":"punctuation.brackets.angle.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.angle.end.wit"}},"applyEndPatternLast":true},"type-definition":{"name":"meta.type-item.wit","begin":"\\s*\\b(type)\\b\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\=)\\s*","end":"\\s*(?\u003c=\\n)","patterns":[{"name":"meta.types.type-item.wit","include":"#types"}],"beginCaptures":{"1":{"name":"keyword.declaration.type.type-item.wit storage.type.wit"},"2":{"name":"entity.name.type.id.type-item.wit"},"7":{"name":"punctuation.equal.wit"}},"applyEndPatternLast":true},"typedef-item":{"name":"meta.typedef-item.wit","patterns":[{"include":"#resource"},{"include":"#variant"},{"include":"#record"},{"include":"#union"},{"include":"#flags"},{"include":"#enum"},{"include":"#type-definition"}]},"types":{"name":"meta.ty.wit","patterns":[{"include":"#primitive"},{"include":"#container"},{"include":"#identifier"}]},"union":{"name":"meta.union-items.wit","begin":"\\s*\\b(union)\\b\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"name":"meta.types.union-cases.wit","include":"#types"},{"name":"punctuation.comma.wit","match":"\\s*(\\,)"}],"beginCaptures":{"1":{"name":"keyword.other.union.union-items.wit"},"2":{"name":"entity.name.type.declaration.id.union-items.wit"},"7":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}},"applyEndPatternLast":true},"use":{"name":"meta.use-item.wit","begin":"\\s*\\b(use)\\b\\s+([^\\s]+)(\\.)(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"name":"entity.name.type.declaration.use-names-item.use-item.wit","match":"\\b((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\b"},{"name":"punctuation.comma.wit","match":"\\s*(\\,)"}],"beginCaptures":{"1":{"name":"keyword.other.use.use-item.wit"},"2":{"patterns":[{"include":"#use-path"}]},"3":{"name":"keyword.operator.namespace-separator.use-item.wit"},"4":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}}},"use-path":{"name":"meta.use-path.wit","patterns":[{"name":"variable.language.self.use-path.wit","match":"(?\u003c!\\.)\\b(self|pkg)\\b"},{"name":"entity.name.namespace.id.use-path.wit","match":"\\b((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\b"},{"name":"keyword.operator.namespace-separator.use-path.wit","match":"\\."}]},"variant":{"name":"meta.variant.wit","begin":"\\s*\\b(variant)\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"include":"#variant-cases"},{"include":"#enum-cases"}],"beginCaptures":{"1":{"name":"keyword.other.variant.wit"},"2":{"name":"entity.name.type.id.variant.wit"},"7":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}},"applyEndPatternLast":true},"variant-cases":{"name":"meta.variant-cases.wit","begin":"\\s*\\b((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\b\\s*(\\()\\s*","end":"\\s*(\\))\\s*(\\,)?\\s*","patterns":[{"name":"meta.types.variant-cases.wit","include":"#types"}],"beginCaptures":{"1":{"name":"variable.other.enummember.id.variant-cases.wit"},"6":{"name":"punctuation.brackets.round.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.round.end.wit"},"2":{"name":"punctuation.comma.wit"}},"applyEndPatternLast":true},"world":{"name":"meta.world-item.wit","begin":"^\\b(default\\s+)?(world)\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\{)\\s*","end":"\\s*(\\})\\s*","patterns":[{"include":"#comment"},{"name":"meta.export-item.wit","begin":"\\s*\\b(export)\\b\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\:)\\s*","end":"\\s*(?\u003c=\\n)","patterns":[{"include":"#extern"}],"beginCaptures":{"1":{"name":"keyword.control.export.export-item.wit"},"2":{"name":"variable.other.constant.id.export-item.wit"},"7":{"name":"keyword.operator.key-value.wit"}},"applyEndPatternLast":true},{"name":"meta.import-item.wit","begin":"\\s*\\b(import)\\s+((?\u003c![\\-\\w])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*)(([\\-])([a-z][0-9a-z]*|[A-Z][0-9A-Z]*))*)\\s*(\\:)","end":"\\s*(?\u003c=\\n)","patterns":[{"include":"#extern"}],"beginCaptures":{"1":{"name":"keyword.control.import.import-item.wit"},"2":{"name":"variable.other.id.import-item.wit"},"7":{"name":"keyword.operator.key-value.wit"}},"applyEndPatternLast":true},{"include":"#use"},{"include":"#typedef-item"}],"beginCaptures":{"1":{"name":"storage.modifier.default.world-item.wit"},"2":{"name":"keyword.declaration.world.world-item.wit storage.type.wit"},"3":{"name":"entity.name.type.id.world-item.wit"},"8":{"name":"punctuation.brackets.curly.begin.wit"}},"endCaptures":{"1":{"name":"punctuation.brackets.curly.end.wit"}}}}}