{"name":"Smithy","scopeName":"source.smithy","patterns":[{"include":"#comment"},{"name":"meta.keyword.statement.control.smithy","begin":"^(\\$)([A-Z-a-z_][A-Z-a-z0-9_]*)(:)\\s*","end":"\\n","patterns":[{"include":"#value"},{"name":"invalid.illegal.control.smithy","match":"[^\\n]"}],"beginCaptures":{"1":{"name":"keyword.statement.control.smithy"},"2":{"name":"support.type.property-name.smithy"},"3":{"name":"punctuation.separator.dictionary.pair.smithy"}}},{"name":"meta.keyword.statement.metadata.smithy","begin":"^(metadata)\\s+(.+)\\s*(=)\\s*","end":"\\n","patterns":[{"include":"#value"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"variable.other.smithy"},"3":{"name":"keyword.operator.smithy"}}},{"name":"meta.keyword.statement.namespace.smithy","begin":"^(namespace)\\s+","end":"\\n","patterns":[{"name":"entity.name.type.smithy","match":"[A-Z-a-z_][A-Z-a-z0-9_]*(\\.[A-Z-a-z_][A-Z-a-z0-9_]*)*"},{"name":"invalid.illegal.namespace.smithy","match":"[^\\n]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"}}},{"name":"meta.keyword.statement.use.smithy","begin":"^(use)\\s+","end":"\\n","patterns":[{"name":"entity.name.type.smithy","match":"[A-Z-a-z_][A-Z-a-z0-9_]*(\\.[A-Z-a-z_][A-Z-a-z0-9_]*)*#[A-Z-a-z_][A-Z-a-z0-9_]*(\\.[A-Z-a-z_][A-Z-a-z0-9_]*)*"},{"name":"invalid.illegal.use.smithy","match":"[^\\n]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"}}},{"include":"#trait"},{"name":"meta.keyword.statement.shape.smithy","begin":"^(byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|union|service|operation|resource|enum|intEnum)\\s+([A-Z-a-z_][A-Z-a-z0-9_]*)\\s+(with)\\s+(\\[)","end":"\\]","patterns":[{"name":"entity.name.type.smithy","include":"#identifier"},{"include":"#comment"},{"name":"punctuation.separator.array.smithy","match":","}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"},"3":{"name":"keyword.statement.with.smithy"},"4":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","match":"^(byte|short|integer|long|float|double|bigInteger|bigDecimal|boolean|blob|string|timestamp|document|list|set|map|union|service|operation|resource|enum|intEnum)\\s+([A-Z-a-z_][A-Z-a-z0-9_]*)","captures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","begin":"^(structure)\\s+([A-Z-a-z_][A-Z-a-z0-9_]*)(?:\\s+(for)\\s+([0-9a-zA-Z\\.#-]+))?\\s+(with)\\s+(\\[)","end":"\\]","patterns":[{"name":"entity.name.type.smithy","include":"#identifier"},{"include":"#comment"},{"name":"punctuation.separator.array.smithy","match":","}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"},"3":{"name":"keyword.statement.for-resource.smithy"},"4":{"name":"entity.name.type.smithy"},"5":{"name":"keyword.statement.with.smithy"},"6":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},{"name":"meta.keyword.statement.shape.smithy","match":"^(structure)\\s+([A-Z-a-z_][A-Z-a-z0-9_]*)(?:\\s+(for)\\s+([0-9a-zA-Z\\.#-]+))?","captures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"},"3":{"name":"keyword.statement.for-resource.smithy"},"4":{"name":"entity.name.type.smithy"}}},{"begin":"\\{","end":"\\}","patterns":[{"include":"#shape_inner"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},{"name":"meta.keyword.statement.apply.smithy","begin":"^(apply)\\s+([A-Z-a-z0-9_]+)\\s+","end":"\\n","patterns":[{"include":"#trait"},{"name":"invalid.illegal.apply.smithy","match":"[^\\n]"}],"beginCaptures":{"1":{"name":"keyword.statement.smithy"},"2":{"name":"entity.name.type.smithy"}}}],"repository":{"array":{"name":"meta.structure.array.smithy","begin":"\\[","end":"\\]","patterns":[{"include":"#value"},{"name":"punctuation.separator.array.smithy","match":","},{"name":"invalid.illegal.array.smithy","match":"[^\\s\\]]"}],"beginCaptures":{"0":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}},"comment":{"patterns":[{"include":"#doc_comment"},{"include":"#line_comment"}]},"doc_comment":{"name":"comment.block.documentation.smithy","match":"(///.*)"},"dquote":{"name":"string.quoted.double.smithy","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.smithy","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.smithy"}}},"dquote_key":{"name":"support.type.property-name.smithy","match":"\".*\"(?=\\s*:)"},"elided_target":{"match":"(\\$)([A-Z-a-z0-9_\\.#$]+)","captures":{"1":{"name":"keyword.statement.elision.smithy"},"2":{"name":"support.type.property-name.smithy"}}},"identifier":{"name":"entity.name.type.smithy","match":"[A-Z-a-z_][A-Z-a-z0-9_]*"},"identifier_key":{"name":"support.type.property-name.smithy","match":"[A-Z-a-z0-9_\\.#$]+(?=\\s*:)"},"keywords":{"name":"constant.language.smithy","match":"\\b(?:true|false|null)\\b"},"line_comment":{"name":"comment.line.double-slash.smithy","match":"(//.*)"},"number":{"name":"constant.numeric.smithy","match":"(?x: # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional\n )"},"object":{"name":"meta.structure.dictionary.smithy","begin":"\\{","end":"\\}","patterns":[{"include":"#object_inner"}],"beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},"object_inner":{"patterns":[{"include":"#comment"},{"include":"#string_key"},{"name":"punctuation.separator.dictionary.key-value.smithy","match":":"},{"name":"keyword.operator.smithy","match":"="},{"name":"meta.structure.dictionary.value.smithy","include":"#value"},{"name":"punctuation.separator.dictionary.pair.smithy","match":","}]},"shape_inner":{"patterns":[{"include":"#trait"},{"name":"punctuation.separator.dictionary.inline-struct.smithy","match":":="},{"include":"#with_statement"},{"include":"#elided_target"},{"include":"#object_inner"}]},"shapeid":{"name":"entity.name.type.smithy","match":"[A-Z-a-z_][A-Z-a-z0-9_\\.#$]*"},"string":{"patterns":[{"include":"#textblock"},{"include":"#dquote"},{"include":"#shapeid"}]},"string_key":{"patterns":[{"include":"#identifier_key"},{"include":"#dquote_key"}]},"textblock":{"name":"string.quoted.double.smithy","begin":"\"\"\"","end":"\"\"\"","patterns":[{"name":"constant.character.escape.smithy","match":"\\\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.smithy"}}},"trait":{"patterns":[{"name":"meta.keyword.statement.trait.smithy","begin":"(@)([0-9a-zA-Z\\.#-]+)(\\()","end":"\\)","patterns":[{"include":"#object_inner"},{"include":"#value"}],"beginCaptures":{"1":{"name":"punctuation.definition.annotation.smithy"},"2":{"name":"storage.type.annotation.smithy"},"3":{"name":"punctuation.definition.dictionary.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.smithy"}}},{"name":"meta.keyword.statement.trait.smithy","match":"(@)([0-9a-zA-Z\\.#-]+)","captures":{"1":{"name":"punctuation.definition.annotation.smithy"},"2":{"name":"storage.type.annotation.smithy"}}}]},"value":{"patterns":[{"include":"#comment"},{"include":"#keywords"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"}]},"with_statement":{"begin":"(with)\\s+(\\[)","end":"\\]","patterns":[{"name":"punctuation.separator.array.smithy","match":","},{"include":"#identifier"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"keyword.statement.with.smithy"},"2":{"name":"punctuation.definition.array.begin.smithy"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.smithy"}}}}}