{"name":"Svelte Component","scopeName":"source.svelte","patterns":[{"include":"#scope"}],"repository":{"attributes":{"patterns":[{"include":"#attributes-directives"},{"include":"#attributes-keyvalue"},{"include":"#attributes-interpolated"}]},"attributes-directives":{"name":"meta.directive.$1.svelte","begin":"(?\u003c!\u003c)((?:on|use|bind|transition|in|out|animate|let|class|style)(:)(?:((?:--)?[_$[:alpha:]][_\\-$[:alnum:]]*(?=\\s*=))|((?:--)?[_$[:alpha:]][_\\-$[:alnum:]]*)))((\\|\\w+)*)","end":"(?=\\s*+[^=\\s])","patterns":[{"begin":"=","end":"(?\u003c=[^\\s=])(?!\\s*=)|(?=/?\u003e)","patterns":[{"include":"#attributes-value"}],"beginCaptures":{"0":{"name":"punctuation.separator.key-value.svelte"}}}],"beginCaptures":{"1":{"patterns":[{"include":"#attributes-directives-keywords"},{"include":"#attributes-directives-types-assigned"},{"include":"#attributes-directives-types"}]},"2":{"name":"punctuation.definition.keyword.svelte"},"5":{"patterns":[{"name":"support.function.svelte","match":"\\w+"},{"name":"punctuation.separator.svelte","match":"\\|"}]}}},"attributes-directives-keywords":{"patterns":[{"name":"keyword.control.svelte","match":"on|use|bind"},{"name":"keyword.other.animation.svelte","match":"transition|in|out|animate"},{"name":"storage.type.svelte","match":"let"},{"name":"entity.other.attribute-name.svelte","match":"class|style"}]},"attributes-directives-types":{"patterns":[{"name":"variable.parameter.svelte","match":"(?\u003c=bind:).*$"},{"name":"variable.function.svelte","match":"(?:(?\u003c=use:)|(?\u003c=transition:)|(?\u003c=in:)|(?\u003c=out:)|(?\u003c=animate:)).*$"},{"name":"entity.name.type.svelte","match":"(?\u003c=on:).*$"},{"name":"variable.parameter.svelte","match":"((?\u003c=let:)|(?\u003c=class:)|(?\u003c=style:)).*$"}]},"attributes-directives-types-assigned":{"patterns":[{"name":"variable.language.svelte","match":"(?\u003c=(bind):)this$"},{"name":"entity.name.type.svelte","match":"(?\u003c=(bind):).*$"},{"name":"entity.other.attribute-name.class.svelte","match":"(?\u003c=(class):).*$"},{"name":"support.type.property-name.svelte","match":"(?\u003c=(style):).*$"},{"include":"#attributes-directives-types"}]},"attributes-interpolated":{"contentName":"meta.embedded.expression.svelte source.ts","begin":"(?\u003c!:|=)\\s*({)","end":"(\\})","patterns":[{"include":"source.ts"}],"captures":{"1":{"name":"entity.other.attribute-name.svelte"}}},"attributes-keyvalue":{"name":"meta.attribute.$1.svelte","begin":"((?:--)?[_$[:alpha:]][_\\-$[:alnum:]]*)","end":"(?=\\s*+[^=\\s])","patterns":[{"begin":"=","end":"(?\u003c=[^\\s=])(?!\\s*=)|(?=/?\u003e)","patterns":[{"include":"#attributes-value"}],"beginCaptures":{"0":{"name":"punctuation.separator.key-value.svelte"}}}],"beginCaptures":{"0":{"patterns":[{"name":"support.type.property-name.svelte","match":"--.*"},{"name":"entity.other.attribute-name.svelte","match":".+"}]}}},"attributes-value":{"patterns":[{"include":"#interpolation"},{"match":"(?:(['\"])([0-9._]+[\\w%]{,4})(\\1))|(?:([0-9._]+[\\w%]{,4})(?=\\s|/?\u003e))","captures":{"1":{"name":"punctuation.definition.string.begin.svelte"},"2":{"name":"constant.numeric.decimal.svelte"},"3":{"name":"punctuation.definition.string.end.svelte"},"4":{"name":"constant.numeric.decimal.svelte"}}},{"name":"string.unquoted.svelte","match":"([^\\s\"'=\u003c\u003e`/]|/(?!\u003e))+","patterns":[{"include":"#interpolation"}]},{"name":"string.quoted.svelte","begin":"(['\"])","end":"\\1","patterns":[{"include":"#interpolation"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.svelte"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.svelte"}}}]},"comments":{"name":"comment.block.svelte","begin":"\u003c!--","end":"--\u003e","patterns":[{"contentName":"comment.block.documentation.svelte","begin":"(@)(component)","end":"(?=--\u003e)","patterns":[{"match":".*?(?=--\u003e)","captures":{"0":{"patterns":[{"include":"source.gfm"}]}}},{"include":"source.gfm"}],"beginCaptures":{"1":{"name":"punctuation.definition.keyword.svelte"},"2":{"name":"storage.type.class.component.svelte keyword.declaration.class.component.svelte"}}},{"name":"invalid.illegal.characters-not-allowed-here.svelte","match":"\\G-?\u003e|\u003c!--(?!\u003e)|\u003c!-(?=--\u003e)|--!\u003e"}],"captures":{"0":{"name":"punctuation.definition.comment.svelte"}}},"destructuring":{"patterns":[{"name":"meta.embedded.expression.svelte source.ts","begin":"(?={)","end":"(?\u003c=})","patterns":[{"include":"source.ts#object-binding-pattern"}]},{"name":"meta.embedded.expression.svelte source.ts","begin":"(?=\\[)","end":"(?\u003c=\\])","patterns":[{"include":"source.ts#array-binding-pattern"}]}]},"interpolation":{"patterns":[{"contentName":"meta.embedded.expression.svelte source.ts","begin":"\\{","end":"\\}","patterns":[{"begin":"\\G\\s*(?={)","end":"(?\u003c=})","patterns":[{"include":"source.ts#object-literal"}]},{"include":"source.ts"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.svelte"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.svelte"}}}]},"scope":{"patterns":[{"include":"#comments"},{"include":"#special-tags"},{"include":"#tags"},{"include":"#interpolation"},{"name":"text.svelte","begin":"(?\u003c=\u003e|})","end":"(?=\u003c|{)"}]},"special-tags":{"patterns":[{"include":"#special-tags-void"},{"include":"#special-tags-block-begin"},{"include":"#special-tags-block-end"}]},"special-tags-block-begin":{"name":"meta.special.$3.svelte meta.special.start.svelte","begin":"({)\\s*(#([a-z]*))","end":"(})","patterns":[{"include":"#special-tags-modes"}],"beginCaptures":{"1":{"name":"punctuation.definition.block.begin.svelte"},"2":{"patterns":[{"include":"#special-tags-keywords"}]}},"endCaptures":{"0":{"name":"punctuation.definition.block.end.svelte"}}},"special-tags-block-end":{"name":"meta.special.$3.svelte meta.special.end.svelte","begin":"({)\\s*(/([a-z]*))","end":"(})","beginCaptures":{"1":{"name":"punctuation.definition.block.begin.svelte"},"2":{"patterns":[{"include":"#special-tags-keywords"}]}},"endCaptures":{"1":{"name":"punctuation.definition.block.end.svelte"}}},"special-tags-keywords":{"match":"([#@/:])(else\\s+if|[a-z]*)","captures":{"1":{"name":"punctuation.definition.keyword.svelte"},"2":{"patterns":[{"name":"keyword.control.conditional.svelte","match":"if|else\\s+if|else"},{"name":"keyword.control.svelte","match":"each|key"},{"name":"keyword.control.flow.svelte","match":"await|then|catch"},{"name":"keyword.other.svelte","match":"html"},{"name":"keyword.other.debugger.svelte","match":"debug"},{"name":"storage.type.svelte","match":"const"}]}}},"special-tags-modes":{"patterns":[{"name":"meta.embedded.expression.svelte source.ts","begin":"((?\u003c=if)|(?\u003c=key)|(?\u003c=then)|(?\u003c=catch)|(?\u003c=html)).*?\\G","end":"(?=})","patterns":[{"include":"source.ts"}]},{"begin":"(?\u003c=const).*?\\G","end":"(?=})","patterns":[{"begin":"\\G\\s*([_$[:alpha:]][_$[:alnum:]]+)\\s*","end":"(?=\\=)","beginCaptures":{"1":{"name":"variable.other.constant.svelte"}}},{"begin":"(?=\\=)","end":"(?=})","patterns":[{"include":"source.ts#variable-initializer"}]}]},{"begin":"(?\u003c=each).*?\\G","end":"(?=})","patterns":[{"contentName":"meta.embedded.expression.svelte source.ts","begin":"\\G\\s*?(?=\\S)","end":"(?=(?:^\\s*|\\s+)(as))","patterns":[{"include":"source.ts"}]},{"begin":"(as)","end":"(?=})","patterns":[{"include":"#destructuring"},{"contentName":"meta.embedded.expression.svelte source.ts","begin":"\\(","end":"\\)|(?=})","patterns":[{"include":"source.ts"}],"captures":{"0":{"name":"meta.brace.round.svelte"}}},{"match":"(\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*)","captures":{"1":{"name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts"}]}}},{"name":"punctuation.separator.svelte","match":","}],"beginCaptures":{"1":{"name":"keyword.control.as.svelte"}}}]},{"begin":"(?\u003c=await).*?\\G","end":"(?=})","patterns":[{"contentName":"meta.embedded.expression.svelte source.ts","begin":"\\G\\s*?(?=\\S)","end":"\\s+(then)|(?=})","patterns":[{"include":"source.ts"}],"endCaptures":{"1":{"name":"keyword.control.flow.svelte"}}},{"contentName":"meta.embedded.expression.svelte source.ts","begin":"(?\u003c=then)\\b","end":"(?=})","patterns":[{"include":"source.ts"}]}]},{"begin":"(?\u003c=debug).*?\\G","end":"(?=})","patterns":[{"match":"[_$[:alpha:]][_$[:alnum:]]*","captures":{"0":{"name":"meta.embedded.expression.svelte source.ts","patterns":[{"include":"source.ts"}]}}},{"name":"punctuation.separator.svelte","match":","}]}]},"special-tags-void":{"name":"meta.special.$3.svelte","begin":"({)\\s*((?:[@:])(else\\s+if|[a-z]*))","end":"\\}","patterns":[{"include":"#special-tags-modes"}],"beginCaptures":{"1":{"name":"punctuation.definition.block.begin.svelte"},"2":{"patterns":[{"include":"#special-tags-keywords"}]}},"endCaptures":{"0":{"name":"punctuation.definition.block.end.svelte"}}},"tags":{"patterns":[{"include":"#tags-lang"},{"include":"#tags-void"},{"include":"#tags-general-end"},{"include":"#tags-general-start"}]},"tags-end-node":{"match":"(\u003c/)(.*?)\\s*(\u003e)|(/\u003e)","captures":{"1":{"name":"meta.tag.end.svelte punctuation.definition.tag.begin.svelte"},"2":{"name":"meta.tag.end.svelte","patterns":[{"include":"#tags-name"}]},"3":{"name":"meta.tag.end.svelte punctuation.definition.tag.end.svelte"},"4":{"name":"meta.tag.start.svelte punctuation.definition.tag.end.svelte"}}},"tags-general-end":{"name":"meta.scope.tag.$2.svelte","begin":"(\u003c/)([^/\\s\u003e]*)","end":"(\u003e)","beginCaptures":{"1":{"name":"meta.tag.end.svelte punctuation.definition.tag.begin.svelte"},"2":{"name":"meta.tag.end.svelte","patterns":[{"include":"#tags-name"}]}},"endCaptures":{"1":{"name":"meta.tag.end.svelte punctuation.definition.tag.end.svelte"}}},"tags-general-start":{"name":"meta.scope.tag.$2.svelte","begin":"(\u003c)([^/\\s\u003e/]*)","end":"(/?\u003e)","patterns":[{"include":"#tags-start-attributes"}],"beginCaptures":{"0":{"patterns":[{"include":"#tags-start-node"}]}},"endCaptures":{"1":{"name":"meta.tag.start.svelte punctuation.definition.tag.end.svelte"}}},"tags-lang":{"name":"meta.$1.svelte","begin":"\u003c(script|style|template)","end":"\u003c/\\1\\s*\u003e|/\u003e","patterns":[{"name":"meta.lang.$3.svelte","begin":"\\G(?=\\s*[^\u003e]*?(type|lang)\\s*=\\s*(['\"]|)(?:text/)?(\\w+)\\2)","end":"(?=\u003c/|/\u003e)","patterns":[{"include":"#tags-lang-start-attributes"}]},{"include":"#tags-lang-start-attributes"}],"beginCaptures":{"0":{"patterns":[{"include":"#tags-start-node"}]}},"endCaptures":{"0":{"patterns":[{"include":"#tags-end-node"}]}}},"tags-lang-start-attributes":{"name":"meta.tag.start.svelte","begin":"\\G","end":"(?=/\u003e)|\u003e","patterns":[{"include":"#attributes"}],"endCaptures":{"0":{"name":"punctuation.definition.tag.end.svelte"}}},"tags-name":{"patterns":[{"match":"(svelte)(:)([a-z][\\w0-9:-]*)","captures":{"1":{"name":"keyword.control.svelte"},"2":{"name":"punctuation.definition.keyword.svelte"},"3":{"name":"entity.name.tag.svelte"}}},{"name":"keyword.control.svelte","match":"slot"},{"name":"support.class.component.svelte","match":"[A-Z][a-zA-Z0-9_]*"},{"name":"meta.tag.custom.svelte entity.name.tag.svelte","match":"[a-z][\\w0-9:]*-[\\w0-9:-]*"},{"name":"entity.name.tag.svelte","match":"[a-z][\\w0-9:-]*"}]},"tags-start-attributes":{"name":"meta.tag.start.svelte","begin":"\\G","end":"(?=/?\u003e)","include":"#attributes"},"tags-start-node":{"name":"meta.tag.start.svelte","match":"(\u003c)([^/\\s\u003e/]*)","captures":{"1":{"name":"punctuation.definition.tag.begin.svelte"},"2":{"patterns":[{"include":"#tags-name"}]}}},"tags-void":{"name":"meta.tag.void.svelte","begin":"(\u003c)(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)(?=\\s|/?\u003e)","end":"/?\u003e","patterns":[{"include":"#attributes"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.svelte"},"2":{"name":"entity.name.tag.svelte"}},"endCaptures":{"0":{"name":"punctuation.definition.tag.begin.svelte"}}}},"injections":{"L:(source.ts, source.js, source.coffee)":{"patterns":[{"name":"punctuation.definition.variable.svelte","match":"(?\u003c![_$[:alnum:]])\\$(?=[_[:alpha:]][_$[:alnum:]]*)"},{"name":"punctuation.definition.variable.svelte","match":"(?\u003c![_$[:alnum:]])(\\$\\$)(?=props|restProps|slots)"}]},"L:meta.script.svelte - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.ts","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.ts"}]}]},"L:meta.script.svelte meta.lang.coffee - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.coffee","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.coffee"}]}]},"L:meta.script.svelte meta.lang.javascript - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.ts","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.ts"}]}]},"L:meta.script.svelte meta.lang.js - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.ts","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.ts"}]}]},"L:meta.script.svelte meta.lang.ts - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.ts","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.ts"}]}]},"L:meta.script.svelte meta.lang.typescript - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.ts","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.ts"}]}]},"L:meta.style.svelte - meta.lang - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.css","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.css"}]}]},"L:meta.style.svelte meta.lang.css - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.css","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.css"}]}]},"L:meta.style.svelte meta.lang.less - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.css.less","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.css.less"}]}]},"L:meta.style.svelte meta.lang.postcss - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.css.postcss","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{}]}]},"L:meta.style.svelte meta.lang.sass - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.sass","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.sass"}]}]},"L:meta.style.svelte meta.lang.scss - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.css.scss","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.css.scss"}]}]},"L:meta.style.svelte meta.lang.stylus - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"source.stylus","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"source.stylus"}]}]},"L:meta.template.svelte - meta.lang - (meta source)":{"patterns":[{"begin":"(?\u003c=\u003e)\\s","end":"(?=\u003c/template)","patterns":[{"include":"#scope"}]}]},"L:meta.template.svelte meta.lang.pug - (meta source)":{"patterns":[{"name":"meta.embedded.block.svelte","contentName":"text.pug","begin":"(?\u003c=\u003e)(?!\u003c/)","end":"(?=\u003c/)","patterns":[{"include":"text.jade"}]}]}}}