{"name":"Avro","scopeName":"source.avro","patterns":[{"include":"#comments"},{"include":"#decorators"},{"include":"#protocol"},{"include":"#contents"}],"repository":{"collections":{"name":"meta.collection","patterns":[{"contentName":"meta.type.collection.avro","begin":"\\b(array|map)\\s*\u003c","end":"\u003e","patterns":[{"include":"#types"},{"include":"#comments"},{"include":"#decorators"},{"include":"#declared_type"}],"beginCaptures":{"1":{"name":"storage.type.collection.avro"}}}]},"comments":{"name":"meta.comments","patterns":[{"name":"comment.line.double-slash.avro","begin":"//","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.avro"}}},{"name":"comment.block.avro","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"punctuation.definition.comment.avro"}}}]},"constants":{"patterns":[{"name":"constant.language.avro","match":"\\b(true|false|null)\\b"},{"name":"constant.language.avro","match":"\\b[A-Z][A-Z0-9_]*\\b"},{"name":"constant.numeric.avro","match":"\\b-?[0-9]+(\\.[0-9]*)?\\b"}]},"contents":{"patterns":[{"include":"#decorators"},{"include":"#record"},{"include":"#error"},{"include":"#declaration"},{"include":"#comments"},{"include":"#import"},{"include":"#union"},{"include":"#fixed"},{"include":"#function"},{"include":"#keywords"},{"include":"#strings"},{"include":"#collections"},{"include":"#throws"},{"include":"#constants"},{"include":"#declared_type"}]},"decimal":{"match":"\\b(decimal)\\s*\\(([^)]+)\\)([^;]*)","captures":{"1":{"name":"support.type.logical.avro"},"2":{"name":"meta.decimal.length","patterns":[{"include":"#comments"},{"name":"constant.numeric.avro","match":"\\b[0-9]+\\b"}]},"3":{"name":"meta.decimal.avro","patterns":[{"include":"#comments"},{"include":"#decorators"},{"include":"#variable"}]}}},"declaration":{"patterns":[{"contentName":"meta.enum.declaration.avro","begin":"\\b(enum)\\s+(\\w+)\\s*{","end":"}","patterns":[{"include":"#comments"},{"include":"#decorators"},{"name":"variable.other.enummember.avro","match":"\\b\\w+\\b"}],"beginCaptures":{"1":{"name":"keyword.struct.enum.avro"},"2":{"name":"entity.name.type.avro"}}}]},"declared_type":{"name":"entity.name.type","match":"\\w+"},"decorators":{"patterns":[{"name":"meta.decorator","contentName":"meta.decorator.avro","begin":"(@[-\\w]+)\\s*\\(","end":"\\)","patterns":[{"include":"#object"}],"beginCaptures":{"1":{"name":"meta.decorator.name.avro","patterns":[{"name":"keyword.control.avro","match":"@(aliases|namespace|order)"},{"name":"entity.name.tag.avro","match":"@[-\\w]+"}]}}}]},"error":{"patterns":[{"contentName":"meta.error.avro","begin":"\\b(error)\\s+(\\w*)\\s*{","end":"}","patterns":[{"include":"#comments"},{"include":"#decorators"},{"include":"#field"}],"beginCaptures":{"1":{"name":"keyword.struct.error.avro"},"2":{"name":"entity.name.type.avro"}}}]},"field":{"name":"meta.field","begin":"(?=\\S)","end":";","patterns":[{"include":"#decorators"},{"include":"#field_base_type_entry"},{"include":"#field_user_type_entry"}]},"field_base_type_entry":{"name":"meta.field.base.avro","begin":"(?=(?:map|array|union|int|long|string|boolean|float|double|null|bytes|decimal|date|time_ms|timestamp_ms))","end":"(?=;)","patterns":[{"include":"#types"},{"include":"#decorators"},{"include":"#variable"},{"include":"#comments"},{"include":"#field_default_value"}]},"field_default_value":{"name":"meta.default.avro","begin":"=","end":"(?=;)","patterns":[{"include":"#strings"},{"include":"#object"},{"include":"#constants"}]},"field_user_type_entry":{"name":"meta.field.user.avro","begin":"\\b\\w+","end":"(?=;)","patterns":[{"include":"#decorators"},{"include":"#variable"},{"include":"#comments"},{"include":"#field_default_value"}],"beginCaptures":{"0":{"name":"entity.name.type.avro"}}},"fixed":{"match":"\\b(fixed)\\b([^(]+)\\(([^)]+)\\)","captures":{"1":{"name":"support.type.logical.avro"},"2":{"name":"meta.fixed.avro","patterns":[{"include":"#comments"},{"include":"#decorators"},{"name":"entity.name.type.avro","match":"\\w+"}]},"3":{"name":"meta.fixed.length","patterns":[{"include":"#comments"},{"name":"constant.numeric.avro","match":"\\b[0-9]+\\b"}]}}},"function":{"name":"meta.function","contentName":"meta.function.parameters.avro","begin":"\\b([\\w`]+)\\s*\\(","end":"\\)","patterns":[{"include":"#function_param"}],"beginCaptures":{"1":{"name":"meta.function.name.avro","patterns":[{"name":"entity.name.function.avro","match":"\\w+"}]}}},"function_param":{"name":"meta.function.param","begin":"(?!=\\))","end":",|(?=\\))","patterns":[{"begin":"\\w+","end":",|(?=\\))","patterns":[{"include":"#decorators"},{"include":"#variable"},{"include":"#comments"},{"include":"#function_param_default_value"}],"beginCaptures":{"0":{"name":"meta.function.param.type","patterns":[{"include":"#types"},{"include":"#declared_type"}]}}},{"include":"#comments"},{"include":"#decorators"}]},"function_param_default_value":{"name":"meta.default.avro","begin":"=","end":"(?=[,)])","patterns":[{"include":"#strings"},{"include":"#object"},{"include":"#constants"}]},"import":{"patterns":[{"match":"\\b(import)\\s+(idl|protocol|schema)\\s+([^;]+);","captures":{"1":{"name":"keyword.avro"},"2":{"name":"keyword.avro"},"3":{"patterns":[{"include":"#strings"}]}}}]},"keywords":{"patterns":[{"name":"keyword.struct.avro","match":"\\b(protocol|record)\\b"},{"name":"keyword.other.avro","match":"\\b(oneway)\\b"},{"name":"keyword.control.avro","match":"(@namespace|@extends|@import)\\b"},{"include":"#types"},{"name":"constant.language.avro","match":"\\b(true|false|null)\\b"},{"name":"constant.language.avro","match":"\\b[A-Z][A-Z0-9_]*\\b"}]},"object":{"patterns":[{"begin":"\\[","end":"\\]","patterns":[{"include":"#object"}]},{"begin":"{","end":"}","patterns":[{"include":"#object"}]},{"include":"#strings"},{"include":"#constants"},{"include":"#comments"}]},"protocol":{"patterns":[{"begin":"\\b(protocol)\\s+(\\w+)\\s*{","end":"}","patterns":[{"include":"#contents"}],"beginCaptures":{"1":{"name":"keyword.struct.avro"},"2":{"name":"entity.name.type.avro"}}}]},"record":{"patterns":[{"contentName":"meta.record.avro","begin":"\\b(record)\\s+(\\w+)\\s*{","end":"}","patterns":[{"include":"#comments"},{"include":"#field"}],"beginCaptures":{"1":{"name":"keyword.struct.record.avro"},"2":{"name":"entity.name.type.avro"}}}]},"strings":{"name":"string.quoted.double.avro","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.avro","match":"\\\\."}]},"throws":{"name":"meta.throws","begin":"\\bthrows\\b","end":"(?=;)","patterns":[{"include":"#comments"},{"name":"entity.name.type.avro","match":"\\b\\w+\\b"}],"beginCaptures":{"0":{"name":"keyword.control.avro"}}},"types":{"patterns":[{"include":"#union"},{"include":"#decimal"},{"include":"#collections"},{"name":"support.type.primitive.avro","match":"\\b(int|long|string|boolean|float|double|null|bytes)\\b"},{"name":"support.type.logical.avro","match":"\\b(date|time_ms|timestamp_ms|uuid)\\b"},{"name":"support.type.primitive.avro","match":"\\b(uint|void)\\b"}]},"union":{"patterns":[{"contentName":"meta.type.union.avro","begin":"\\b(union)\\s*{","end":"}","patterns":[{"include":"#comments"},{"include":"#types"},{"include":"#declared_type"}],"beginCaptures":{"1":{"name":"keyword.struct.union.avro"}}}]},"variable":{"match":"(`?)(\\w+)(`?)","captures":{"1":{"name":"variable.name.escape.avro"},"2":{"name":"variable.name.avro"},"3":{"name":"variable.name.escape.avro"}}}}}