diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-22 00:35:39 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-22 00:35:39 +0100 |
| commit | 52040cc19cbdca48f91d4eb91e9b7a782bb5fbd0 (patch) | |
| tree | 8c6a61f5a6db99c4c7a663e1e2c0f069c3794c4b /vendor/tree-sitter-rust/src/grammar.json | |
| parent | 8ab1da7853f6dd309f2d3677ca109737f929ab4a (diff) | |
| download | crep-52040cc19cbdca48f91d4eb91e9b7a782bb5fbd0.tar.gz | |
Add Rust, Go and rename examples to tests
Diffstat (limited to 'vendor/tree-sitter-rust/src/grammar.json')
| -rw-r--r-- | vendor/tree-sitter-rust/src/grammar.json | 9405 |
1 files changed, 9405 insertions, 0 deletions
diff --git a/vendor/tree-sitter-rust/src/grammar.json b/vendor/tree-sitter-rust/src/grammar.json new file mode 100644 index 0000000..1465623 --- /dev/null +++ b/vendor/tree-sitter-rust/src/grammar.json @@ -0,0 +1,9405 @@ +{ + "name": "rust", + "inherits": null, + "word": "identifier", + "rules": { + "source_file": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "shebang" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + } + ] + }, + "_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression_statement" + }, + { + "type": "SYMBOL", + "name": "_declaration_statement" + } + ] + }, + "empty_statement": { + "type": "STRING", + "value": ";" + }, + "expression_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + { + "type": "PREC", + "value": 1, + "content": { + "type": "SYMBOL", + "name": "_expression_ending_with_block" + } + } + ] + }, + "_declaration_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "const_item" + }, + { + "type": "SYMBOL", + "name": "macro_invocation" + }, + { + "type": "SYMBOL", + "name": "macro_definition" + }, + { + "type": "SYMBOL", + "name": "empty_statement" + }, + { + "type": "SYMBOL", + "name": "attribute_item" + }, + { + "type": "SYMBOL", + "name": "inner_attribute_item" + }, + { + "type": "SYMBOL", + "name": "mod_item" + }, + { + "type": "SYMBOL", + "name": "foreign_mod_item" + }, + { + "type": "SYMBOL", + "name": "struct_item" + }, + { + "type": "SYMBOL", + "name": "union_item" + }, + { + "type": "SYMBOL", + "name": "enum_item" + }, + { + "type": "SYMBOL", + "name": "type_item" + }, + { + "type": "SYMBOL", + "name": "function_item" + }, + { + "type": "SYMBOL", + "name": "function_signature_item" + }, + { + "type": "SYMBOL", + "name": "impl_item" + }, + { + "type": "SYMBOL", + "name": "trait_item" + }, + { + "type": "SYMBOL", + "name": "associated_type" + }, + { + "type": "SYMBOL", + "name": "let_declaration" + }, + { + "type": "SYMBOL", + "name": "use_declaration" + }, + { + "type": "SYMBOL", + "name": "extern_crate_declaration" + }, + { + "type": "SYMBOL", + "name": "static_item" + } + ] + }, + "macro_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "macro_rules!" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "macro_rule" + }, + { + "type": "STRING", + "value": ";" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "macro_rule" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "macro_rule" + }, + { + "type": "STRING", + "value": ";" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "macro_rule" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": "]" + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "macro_rule" + }, + { + "type": "STRING", + "value": ";" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "macro_rule" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + } + ] + }, + "macro_rule": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "token_tree_pattern" + } + }, + { + "type": "STRING", + "value": "=>" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "token_tree" + } + } + ] + }, + "_token_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "token_tree_pattern" + }, + { + "type": "SYMBOL", + "name": "token_repetition_pattern" + }, + { + "type": "SYMBOL", + "name": "token_binding_pattern" + }, + { + "type": "SYMBOL", + "name": "metavariable" + }, + { + "type": "SYMBOL", + "name": "_non_special_token" + } + ] + }, + "token_tree_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_token_pattern" + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_token_pattern" + } + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_token_pattern" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + }, + "token_binding_pattern": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "metavariable" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "fragment_specifier" + } + } + ] + } + }, + "token_repetition_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "$" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_token_pattern" + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^+*?]+" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "?" + } + ] + } + ] + }, + "fragment_specifier": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "block" + }, + { + "type": "STRING", + "value": "expr" + }, + { + "type": "STRING", + "value": "ident" + }, + { + "type": "STRING", + "value": "item" + }, + { + "type": "STRING", + "value": "lifetime" + }, + { + "type": "STRING", + "value": "literal" + }, + { + "type": "STRING", + "value": "meta" + }, + { + "type": "STRING", + "value": "pat" + }, + { + "type": "STRING", + "value": "path" + }, + { + "type": "STRING", + "value": "stmt" + }, + { + "type": "STRING", + "value": "tt" + }, + { + "type": "STRING", + "value": "ty" + }, + { + "type": "STRING", + "value": "vis" + } + ] + }, + "_tokens": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "token_tree" + }, + { + "type": "SYMBOL", + "name": "token_repetition" + }, + { + "type": "SYMBOL", + "name": "metavariable" + }, + { + "type": "SYMBOL", + "name": "_non_special_token" + } + ] + }, + "token_tree": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_tokens" + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_tokens" + } + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_tokens" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + }, + "token_repetition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "$" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_tokens" + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^+*?]+" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "?" + } + ] + } + ] + }, + "_non_special_token": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_literal" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "SYMBOL", + "name": "self" + }, + { + "type": "SYMBOL", + "name": "super" + }, + { + "type": "SYMBOL", + "name": "crate" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u8" + }, + { + "type": "STRING", + "value": "i8" + }, + { + "type": "STRING", + "value": "u16" + }, + { + "type": "STRING", + "value": "i16" + }, + { + "type": "STRING", + "value": "u32" + }, + { + "type": "STRING", + "value": "i32" + }, + { + "type": "STRING", + "value": "u64" + }, + { + "type": "STRING", + "value": "i64" + }, + { + "type": "STRING", + "value": "u128" + }, + { + "type": "STRING", + "value": "i128" + }, + { + "type": "STRING", + "value": "isize" + }, + { + "type": "STRING", + "value": "usize" + }, + { + "type": "STRING", + "value": "f32" + }, + { + "type": "STRING", + "value": "f64" + }, + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "str" + }, + { + "type": "STRING", + "value": "char" + } + ] + }, + "named": true, + "value": "primitive_type" + }, + { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "STRING", + "value": "%" + }, + { + "type": "STRING", + "value": "^" + }, + { + "type": "STRING", + "value": "!" + }, + { + "type": "STRING", + "value": "&" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "STRING", + "value": "&&" + }, + { + "type": "STRING", + "value": "||" + }, + { + "type": "STRING", + "value": "<<" + }, + { + "type": "STRING", + "value": ">>" + }, + { + "type": "STRING", + "value": "+=" + }, + { + "type": "STRING", + "value": "-=" + }, + { + "type": "STRING", + "value": "*=" + }, + { + "type": "STRING", + "value": "/=" + }, + { + "type": "STRING", + "value": "%=" + }, + { + "type": "STRING", + "value": "^=" + }, + { + "type": "STRING", + "value": "&=" + }, + { + "type": "STRING", + "value": "|=" + }, + { + "type": "STRING", + "value": "<<=" + }, + { + "type": "STRING", + "value": ">>=" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": "==" + }, + { + "type": "STRING", + "value": "!=" + }, + { + "type": "STRING", + "value": ">" + }, + { + "type": "STRING", + "value": "<" + }, + { + "type": "STRING", + "value": ">=" + }, + { + "type": "STRING", + "value": "<=" + }, + { + "type": "STRING", + "value": "@" + }, + { + "type": "STRING", + "value": "_" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "STRING", + "value": ".." + }, + { + "type": "STRING", + "value": "..." + }, + { + "type": "STRING", + "value": "..=" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "STRING", + "value": "=>" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "STRING", + "value": "?" + } + ] + } + } + }, + { + "type": "STRING", + "value": "'" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "STRING", + "value": "async" + }, + { + "type": "STRING", + "value": "await" + }, + { + "type": "STRING", + "value": "break" + }, + { + "type": "STRING", + "value": "const" + }, + { + "type": "STRING", + "value": "continue" + }, + { + "type": "STRING", + "value": "default" + }, + { + "type": "STRING", + "value": "enum" + }, + { + "type": "STRING", + "value": "fn" + }, + { + "type": "STRING", + "value": "for" + }, + { + "type": "STRING", + "value": "if" + }, + { + "type": "STRING", + "value": "impl" + }, + { + "type": "STRING", + "value": "let" + }, + { + "type": "STRING", + "value": "loop" + }, + { + "type": "STRING", + "value": "match" + }, + { + "type": "STRING", + "value": "mod" + }, + { + "type": "STRING", + "value": "pub" + }, + { + "type": "STRING", + "value": "return" + }, + { + "type": "STRING", + "value": "static" + }, + { + "type": "STRING", + "value": "struct" + }, + { + "type": "STRING", + "value": "trait" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "STRING", + "value": "union" + }, + { + "type": "STRING", + "value": "unsafe" + }, + { + "type": "STRING", + "value": "use" + }, + { + "type": "STRING", + "value": "where" + }, + { + "type": "STRING", + "value": "while" + } + ] + }, + "attribute_item": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "attribute" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "inner_attribute_item": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "STRING", + "value": "!" + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "attribute" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "attribute": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "delim_token_tree" + }, + "named": true, + "value": "token_tree" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "mod_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "mod" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "declaration_list" + } + } + ] + } + ] + }, + "foreign_mod_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "extern_modifier" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "declaration_list" + } + } + ] + } + ] + }, + "declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_declaration_statement" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "struct_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "struct" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "field_declaration_list" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "ordered_field_declaration_list" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + } + ] + }, + "union_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "union" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "field_declaration_list" + } + } + ] + }, + "enum_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "enum" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "enum_variant_list" + } + } + ] + }, + "enum_variant_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "enum_variant" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "enum_variant" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "enum_variant": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "field_declaration_list" + }, + { + "type": "SYMBOL", + "name": "ordered_field_declaration_list" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "field_declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "field_declaration" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "field_declaration" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "field_declaration": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_field_identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "ordered_field_declaration_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "extern_crate_declaration": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "extern" + }, + { + "type": "SYMBOL", + "name": "crate" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "const_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "const" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "static_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "static" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "ref" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "type_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "function_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_modifiers" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "fn" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "metavariable" + } + ] + } + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameters" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "return_type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + "function_signature_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_modifiers" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "fn" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "metavariable" + } + ] + } + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameters" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "return_type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "function_modifiers": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "STRING", + "value": "default" + }, + { + "type": "STRING", + "value": "const" + }, + { + "type": "STRING", + "value": "unsafe" + }, + { + "type": "SYMBOL", + "name": "extern_modifier" + } + ] + } + }, + "where_clause": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "where" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "where_predicate" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "where_predicate" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "where_predicate": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_type_identifier" + }, + { + "type": "SYMBOL", + "name": "generic_type" + }, + { + "type": "SYMBOL", + "name": "reference_type" + }, + { + "type": "SYMBOL", + "name": "pointer_type" + }, + { + "type": "SYMBOL", + "name": "tuple_type" + }, + { + "type": "SYMBOL", + "name": "array_type" + }, + { + "type": "SYMBOL", + "name": "higher_ranked_trait_bound" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u8" + }, + { + "type": "STRING", + "value": "i8" + }, + { + "type": "STRING", + "value": "u16" + }, + { + "type": "STRING", + "value": "i16" + }, + { + "type": "STRING", + "value": "u32" + }, + { + "type": "STRING", + "value": "i32" + }, + { + "type": "STRING", + "value": "u64" + }, + { + "type": "STRING", + "value": "i64" + }, + { + "type": "STRING", + "value": "u128" + }, + { + "type": "STRING", + "value": "i128" + }, + { + "type": "STRING", + "value": "isize" + }, + { + "type": "STRING", + "value": "usize" + }, + { + "type": "STRING", + "value": "f32" + }, + { + "type": "STRING", + "value": "f64" + }, + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "str" + }, + { + "type": "STRING", + "value": "char" + } + ] + }, + "named": true, + "value": "primitive_type" + } + ] + } + }, + { + "type": "FIELD", + "name": "bounds", + "content": { + "type": "SYMBOL", + "name": "trait_bounds" + } + } + ] + }, + "impl_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "unsafe" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "impl" + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "trait", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_type_identifier" + }, + { + "type": "SYMBOL", + "name": "generic_type" + } + ] + } + }, + { + "type": "STRING", + "value": "for" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "declaration_list" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + } + ] + }, + "trait_item": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "unsafe" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "trait" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "bounds", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "trait_bounds" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "declaration_list" + } + } + ] + }, + "associated_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_parameters" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "FIELD", + "name": "bounds", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "trait_bounds" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "trait_bounds": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "SYMBOL", + "name": "higher_ranked_trait_bound" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "SYMBOL", + "name": "higher_ranked_trait_bound" + } + ] + } + ] + } + } + ] + } + ] + }, + "higher_ranked_trait_bound": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "FIELD", + "name": "type_parameters", + "content": { + "type": "SYMBOL", + "name": "type_parameters" + } + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "removed_trait_bound": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "type_parameters": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "SYMBOL", + "name": "metavariable" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "constrained_type_parameter" + }, + { + "type": "SYMBOL", + "name": "optional_type_parameter" + }, + { + "type": "SYMBOL", + "name": "const_parameter" + } + ] + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "SYMBOL", + "name": "metavariable" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "constrained_type_parameter" + }, + { + "type": "SYMBOL", + "name": "optional_type_parameter" + }, + { + "type": "SYMBOL", + "name": "const_parameter" + } + ] + } + ] + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ">" + } + ] + } + }, + "const_parameter": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "const" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "constrained_type_parameter": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + } + ] + } + }, + { + "type": "FIELD", + "name": "bounds", + "content": { + "type": "SYMBOL", + "name": "trait_bounds" + } + } + ] + }, + "optional_type_parameter": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "constrained_type_parameter" + } + ] + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "default_type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "let_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "use_declaration": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "visibility_modifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "use" + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_use_clause" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + }, + "_use_clause": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_path" + }, + { + "type": "SYMBOL", + "name": "use_as_clause" + }, + { + "type": "SYMBOL", + "name": "use_list" + }, + { + "type": "SYMBOL", + "name": "scoped_use_list" + }, + { + "type": "SYMBOL", + "name": "use_wildcard" + } + ] + }, + "scoped_use_list": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "path", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_path" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "FIELD", + "name": "list", + "content": { + "type": "SYMBOL", + "name": "use_list" + } + } + ] + }, + "use_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_use_clause" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_use_clause" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "use_as_clause": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "path", + "content": { + "type": "SYMBOL", + "name": "_path" + } + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "use_wildcard": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_path" + }, + { + "type": "STRING", + "value": "::" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "*" + } + ] + }, + "parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_item" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parameter" + }, + { + "type": "SYMBOL", + "name": "self_parameter" + }, + { + "type": "SYMBOL", + "name": "variadic_parameter" + }, + { + "type": "STRING", + "value": "_" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_item" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parameter" + }, + { + "type": "SYMBOL", + "name": "self_parameter" + }, + { + "type": "SYMBOL", + "name": "variadic_parameter" + }, + { + "type": "STRING", + "value": "_" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "self_parameter": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "self" + } + ] + }, + "variadic_parameter": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + }, + { + "type": "STRING", + "value": ":" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "..." + } + ] + }, + "parameter": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "SYMBOL", + "name": "self" + } + ] + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "extern_modifier": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "extern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string_literal" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "visibility_modifier": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "crate" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "pub" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "self" + }, + { + "type": "SYMBOL", + "name": "super" + }, + { + "type": "SYMBOL", + "name": "crate" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "in" + }, + { + "type": "SYMBOL", + "name": "_path" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + "_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "abstract_type" + }, + { + "type": "SYMBOL", + "name": "reference_type" + }, + { + "type": "SYMBOL", + "name": "metavariable" + }, + { + "type": "SYMBOL", + "name": "pointer_type" + }, + { + "type": "SYMBOL", + "name": "generic_type" + }, + { + "type": "SYMBOL", + "name": "scoped_type_identifier" + }, + { + "type": "SYMBOL", + "name": "tuple_type" + }, + { + "type": "SYMBOL", + "name": "unit_type" + }, + { + "type": "SYMBOL", + "name": "array_type" + }, + { + "type": "SYMBOL", + "name": "function_type" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "macro_invocation" + }, + { + "type": "SYMBOL", + "name": "never_type" + }, + { + "type": "SYMBOL", + "name": "dynamic_type" + }, + { + "type": "SYMBOL", + "name": "bounded_type" + }, + { + "type": "SYMBOL", + "name": "removed_trait_bound" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u8" + }, + { + "type": "STRING", + "value": "i8" + }, + { + "type": "STRING", + "value": "u16" + }, + { + "type": "STRING", + "value": "i16" + }, + { + "type": "STRING", + "value": "u32" + }, + { + "type": "STRING", + "value": "i32" + }, + { + "type": "STRING", + "value": "u64" + }, + { + "type": "STRING", + "value": "i64" + }, + { + "type": "STRING", + "value": "u128" + }, + { + "type": "STRING", + "value": "i128" + }, + { + "type": "STRING", + "value": "isize" + }, + { + "type": "STRING", + "value": "usize" + }, + { + "type": "STRING", + "value": "f32" + }, + { + "type": "STRING", + "value": "f64" + }, + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "str" + }, + { + "type": "STRING", + "value": "char" + } + ] + }, + "named": true, + "value": "primitive_type" + } + ] + }, + "bracketed_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "qualified_type" + } + ] + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "qualified_type": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "lifetime": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + }, + "array_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "FIELD", + "name": "element", + "content": { + "type": "SYMBOL", + "name": "_type" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "FIELD", + "name": "length", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "for_lifetimes": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "STRING", + "value": "<" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "lifetime" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "function_type": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "for_lifetimes" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PREC", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "trait", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_type_identifier" + } + ] + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_modifiers" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "fn" + } + ] + } + ] + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "parameters" + } + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "return_type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "tuple_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "unit_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "generic_function": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_identifier" + }, + { + "type": "SYMBOL", + "name": "field_expression" + } + ] + } + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "FIELD", + "name": "type_arguments", + "content": { + "type": "SYMBOL", + "name": "type_arguments" + } + } + ] + } + }, + "generic_type": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_type_identifier" + } + ] + } + }, + { + "type": "FIELD", + "name": "type_arguments", + "content": { + "type": "SYMBOL", + "name": "type_arguments" + } + } + ] + } + }, + "generic_type_with_turbofish": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_identifier" + } + ] + } + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "FIELD", + "name": "type_arguments", + "content": { + "type": "SYMBOL", + "name": "type_arguments" + } + } + ] + }, + "bounded_type": { + "type": "PREC_LEFT", + "value": -1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "STRING", + "value": "+" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "+" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "+" + }, + { + "type": "SYMBOL", + "name": "lifetime" + } + ] + } + ] + } + }, + "type_arguments": { + "type": "SEQ", + "members": [ + { + "type": "TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "STRING", + "value": "<" + } + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "type_binding" + }, + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "SYMBOL", + "name": "_literal" + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "trait_bounds" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "type_binding" + }, + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "SYMBOL", + "name": "_literal" + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "trait_bounds" + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "type_binding": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + }, + { + "type": "FIELD", + "name": "type_arguments", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_arguments" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "reference_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lifetime" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "pointer_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "const" + }, + { + "type": "SYMBOL", + "name": "mutable_specifier" + } + ] + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "never_type": { + "type": "STRING", + "value": "!" + }, + "abstract_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "impl" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "SYMBOL", + "name": "type_parameters" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "trait", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_type_identifier" + }, + { + "type": "SYMBOL", + "name": "removed_trait_bound" + }, + { + "type": "SYMBOL", + "name": "generic_type" + }, + { + "type": "SYMBOL", + "name": "function_type" + }, + { + "type": "SYMBOL", + "name": "tuple_type" + } + ] + } + } + ] + }, + "dynamic_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "dyn" + }, + { + "type": "FIELD", + "name": "trait", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "higher_ranked_trait_bound" + }, + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_type_identifier" + }, + { + "type": "SYMBOL", + "name": "generic_type" + }, + { + "type": "SYMBOL", + "name": "function_type" + } + ] + } + } + ] + }, + "mutable_specifier": { + "type": "STRING", + "value": "mut" + }, + "_expression_except_range": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "unary_expression" + }, + { + "type": "SYMBOL", + "name": "reference_expression" + }, + { + "type": "SYMBOL", + "name": "try_expression" + }, + { + "type": "SYMBOL", + "name": "binary_expression" + }, + { + "type": "SYMBOL", + "name": "assignment_expression" + }, + { + "type": "SYMBOL", + "name": "compound_assignment_expr" + }, + { + "type": "SYMBOL", + "name": "type_cast_expression" + }, + { + "type": "SYMBOL", + "name": "call_expression" + }, + { + "type": "SYMBOL", + "name": "return_expression" + }, + { + "type": "SYMBOL", + "name": "yield_expression" + }, + { + "type": "SYMBOL", + "name": "_literal" + }, + { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u8" + }, + { + "type": "STRING", + "value": "i8" + }, + { + "type": "STRING", + "value": "u16" + }, + { + "type": "STRING", + "value": "i16" + }, + { + "type": "STRING", + "value": "u32" + }, + { + "type": "STRING", + "value": "i32" + }, + { + "type": "STRING", + "value": "u64" + }, + { + "type": "STRING", + "value": "i64" + }, + { + "type": "STRING", + "value": "u128" + }, + { + "type": "STRING", + "value": "i128" + }, + { + "type": "STRING", + "value": "isize" + }, + { + "type": "STRING", + "value": "usize" + }, + { + "type": "STRING", + "value": "f32" + }, + { + "type": "STRING", + "value": "f64" + }, + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "str" + }, + { + "type": "STRING", + "value": "char" + } + ] + }, + "named": true, + "value": "identifier" + }, + { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + }, + { + "type": "SYMBOL", + "name": "self" + }, + { + "type": "SYMBOL", + "name": "scoped_identifier" + }, + { + "type": "SYMBOL", + "name": "generic_function" + }, + { + "type": "SYMBOL", + "name": "await_expression" + }, + { + "type": "SYMBOL", + "name": "field_expression" + }, + { + "type": "SYMBOL", + "name": "array_expression" + }, + { + "type": "SYMBOL", + "name": "tuple_expression" + }, + { + "type": "PREC", + "value": 1, + "content": { + "type": "SYMBOL", + "name": "macro_invocation" + } + }, + { + "type": "SYMBOL", + "name": "unit_expression" + }, + { + "type": "SYMBOL", + "name": "break_expression" + }, + { + "type": "SYMBOL", + "name": "continue_expression" + }, + { + "type": "SYMBOL", + "name": "index_expression" + }, + { + "type": "SYMBOL", + "name": "metavariable" + }, + { + "type": "SYMBOL", + "name": "closure_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "struct_expression" + }, + { + "type": "SYMBOL", + "name": "_expression_ending_with_block" + } + ] + }, + "_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression_except_range" + }, + { + "type": "SYMBOL", + "name": "range_expression" + } + ] + }, + "_expression_ending_with_block": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "unsafe_block" + }, + { + "type": "SYMBOL", + "name": "async_block" + }, + { + "type": "SYMBOL", + "name": "try_block" + }, + { + "type": "SYMBOL", + "name": "block" + }, + { + "type": "SYMBOL", + "name": "if_expression" + }, + { + "type": "SYMBOL", + "name": "match_expression" + }, + { + "type": "SYMBOL", + "name": "while_expression" + }, + { + "type": "SYMBOL", + "name": "loop_expression" + }, + { + "type": "SYMBOL", + "name": "for_expression" + }, + { + "type": "SYMBOL", + "name": "const_block" + } + ] + }, + "macro_invocation": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "macro", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "scoped_identifier" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + } + }, + { + "type": "STRING", + "value": "!" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "delim_token_tree" + }, + "named": true, + "value": "token_tree" + } + ] + }, + "delim_token_tree": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_delim_tokens" + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_delim_tokens" + } + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_delim_tokens" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + }, + "_delim_tokens": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_non_delim_token" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "delim_token_tree" + }, + "named": true, + "value": "token_tree" + } + ] + }, + "_non_delim_token": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_non_special_token" + }, + { + "type": "STRING", + "value": "$" + } + ] + }, + "scoped_identifier": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "path", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_path" + }, + { + "type": "SYMBOL", + "name": "bracketed_type" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "generic_type_with_turbofish" + }, + "named": true, + "value": "generic_type" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "super" + } + ] + } + } + ] + }, + "scoped_type_identifier_in_expression_position": { + "type": "PREC", + "value": -2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "path", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_path" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "generic_type_with_turbofish" + }, + "named": true, + "value": "generic_type" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + } + ] + } + }, + "scoped_type_identifier": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "path", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_path" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "generic_type_with_turbofish" + }, + "named": true, + "value": "generic_type" + }, + { + "type": "SYMBOL", + "name": "bracketed_type" + }, + { + "type": "SYMBOL", + "name": "generic_type" + } + ] + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_identifier" + } + } + ] + }, + "range_expression": { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ".." + }, + { + "type": "STRING", + "value": "..." + }, + { + "type": "STRING", + "value": "..=" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ".." + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "STRING", + "value": ".." + } + ] + } + }, + "unary_expression": { + "type": "PREC", + "value": 12, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "!" + } + ] + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + "try_expression": { + "type": "PREC", + "value": 13, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "?" + } + ] + } + }, + "reference_expression": { + "type": "PREC", + "value": 12, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "||" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "|" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "^" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "==" + }, + { + "type": "STRING", + "value": "!=" + }, + { + "type": "STRING", + "value": "<" + }, + { + "type": "STRING", + "value": "<=" + }, + { + "type": "STRING", + "value": ">" + }, + { + "type": "STRING", + "value": ">=" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 8, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "<<" + }, + { + "type": "STRING", + "value": ">>" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "-" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "STRING", + "value": "%" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + } + ] + }, + "assignment_expression": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "compound_assignment_expr": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+=" + }, + { + "type": "STRING", + "value": "-=" + }, + { + "type": "STRING", + "value": "*=" + }, + { + "type": "STRING", + "value": "/=" + }, + { + "type": "STRING", + "value": "%=" + }, + { + "type": "STRING", + "value": "&=" + }, + { + "type": "STRING", + "value": "|=" + }, + { + "type": "STRING", + "value": "^=" + }, + { + "type": "STRING", + "value": "<<=" + }, + { + "type": "STRING", + "value": ">>=" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "type_cast_expression": { + "type": "PREC_LEFT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + } + }, + "return_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "return" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC", + "value": -1, + "content": { + "type": "STRING", + "value": "return" + } + } + ] + }, + "yield_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "yield" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC", + "value": -1, + "content": { + "type": "STRING", + "value": "yield" + } + } + ] + }, + "call_expression": { + "type": "PREC", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "SYMBOL", + "name": "_expression_except_range" + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "SYMBOL", + "name": "arguments" + } + } + ] + } + }, + "arguments": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "array_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ";" + }, + { + "type": "FIELD", + "name": "length", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "tuple_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "," + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "," + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "unit_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "struct_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "scoped_type_identifier_in_expression_position" + }, + "named": true, + "value": "scoped_type_identifier" + }, + { + "type": "SYMBOL", + "name": "generic_type_with_turbofish" + } + ] + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "field_initializer_list" + } + } + ] + }, + "field_initializer_list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "shorthand_field_initializer" + }, + { + "type": "SYMBOL", + "name": "field_initializer" + }, + { + "type": "SYMBOL", + "name": "base_field_initializer" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "shorthand_field_initializer" + }, + { + "type": "SYMBOL", + "name": "field_initializer" + }, + { + "type": "SYMBOL", + "name": "base_field_initializer" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "shorthand_field_initializer": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "field_initializer": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute_item" + } + }, + { + "type": "FIELD", + "name": "field", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_field_identifier" + }, + { + "type": "SYMBOL", + "name": "integer_literal" + } + ] + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + "base_field_initializer": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ".." + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "if_expression": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_condition" + } + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "SYMBOL", + "name": "block" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "else_clause" + } + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "let_condition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + } + ] + }, + "_let_chain": { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_let_chain" + }, + { + "type": "STRING", + "value": "&&" + }, + { + "type": "SYMBOL", + "name": "let_condition" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_let_chain" + }, + { + "type": "STRING", + "value": "&&" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "let_condition" + }, + { + "type": "STRING", + "value": "&&" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "let_condition" + }, + { + "type": "STRING", + "value": "&&" + }, + { + "type": "SYMBOL", + "name": "let_condition" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "&&" + }, + { + "type": "SYMBOL", + "name": "let_condition" + } + ] + } + ] + } + }, + "_condition": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "let_condition" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_let_chain" + }, + "named": true, + "value": "let_chain" + } + ] + }, + "else_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "block" + }, + { + "type": "SYMBOL", + "name": "if_expression" + } + ] + } + ] + }, + "match_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "match" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "match_block" + } + } + ] + }, + "match_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "match_arm" + } + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "last_match_arm" + }, + "named": true, + "value": "match_arm" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "match_arm": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_item" + }, + { + "type": "SYMBOL", + "name": "inner_attribute_item" + } + ] + } + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "match_pattern" + } + }, + { + "type": "STRING", + "value": "=>" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "," + } + ] + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "SYMBOL", + "name": "_expression_ending_with_block" + } + } + } + ] + } + ] + } + }, + "last_match_arm": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_item" + }, + { + "type": "SYMBOL", + "name": "inner_attribute_item" + } + ] + } + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "match_pattern" + } + }, + { + "type": "STRING", + "value": "=>" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "match_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_condition" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "while_expression": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "label" + }, + { + "type": "STRING", + "value": ":" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_condition" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + "loop_expression": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "label" + }, + { + "type": "STRING", + "value": ":" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "loop" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + "for_expression": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "label" + }, + { + "type": "STRING", + "value": ":" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "for" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + "const_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "const" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + "closure_expression": { + "type": "PREC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "static" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "move" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "closure_parameters" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "return_type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "block" + } + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "_" + } + ] + } + } + ] + } + ] + } + }, + "closure_parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "SYMBOL", + "name": "parameter" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "SYMBOL", + "name": "parameter" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|" + } + ] + }, + "label": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "break_expression": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "break" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "label" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "continue_expression": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "continue" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "label" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "index_expression": { + "type": "PREC", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "await_expression": { + "type": "PREC", + "value": 14, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "STRING", + "value": "await" + } + ] + } + }, + "field_expression": { + "type": "PREC", + "value": 14, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "field", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_field_identifier" + }, + { + "type": "SYMBOL", + "name": "integer_literal" + } + ] + } + } + ] + } + }, + "unsafe_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "unsafe" + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + }, + "async_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "move" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + }, + "try_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "try" + }, + { + "type": "SYMBOL", + "name": "block" + } + ] + }, + "block": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "label" + }, + { + "type": "STRING", + "value": ":" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_literal_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u8" + }, + { + "type": "STRING", + "value": "i8" + }, + { + "type": "STRING", + "value": "u16" + }, + { + "type": "STRING", + "value": "i16" + }, + { + "type": "STRING", + "value": "u32" + }, + { + "type": "STRING", + "value": "i32" + }, + { + "type": "STRING", + "value": "u64" + }, + { + "type": "STRING", + "value": "i64" + }, + { + "type": "STRING", + "value": "u128" + }, + { + "type": "STRING", + "value": "i128" + }, + { + "type": "STRING", + "value": "isize" + }, + { + "type": "STRING", + "value": "usize" + }, + { + "type": "STRING", + "value": "f32" + }, + { + "type": "STRING", + "value": "f64" + }, + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "str" + }, + { + "type": "STRING", + "value": "char" + } + ] + }, + "named": true, + "value": "identifier" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_identifier" + }, + { + "type": "SYMBOL", + "name": "tuple_pattern" + }, + { + "type": "SYMBOL", + "name": "tuple_struct_pattern" + }, + { + "type": "SYMBOL", + "name": "struct_pattern" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + }, + { + "type": "SYMBOL", + "name": "ref_pattern" + }, + { + "type": "SYMBOL", + "name": "slice_pattern" + }, + { + "type": "SYMBOL", + "name": "captured_pattern" + }, + { + "type": "SYMBOL", + "name": "reference_pattern" + }, + { + "type": "SYMBOL", + "name": "remaining_field_pattern" + }, + { + "type": "SYMBOL", + "name": "mut_pattern" + }, + { + "type": "SYMBOL", + "name": "range_pattern" + }, + { + "type": "SYMBOL", + "name": "or_pattern" + }, + { + "type": "SYMBOL", + "name": "const_block" + }, + { + "type": "SYMBOL", + "name": "macro_invocation" + }, + { + "type": "STRING", + "value": "_" + } + ] + }, + "tuple_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "SYMBOL", + "name": "closure_expression" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "SYMBOL", + "name": "closure_expression" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "slice_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "tuple_struct_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "generic_type_with_turbofish" + }, + "named": true, + "value": "generic_type" + } + ] + } + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "struct_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "type", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_type_identifier" + } + ] + } + }, + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "field_pattern" + }, + { + "type": "SYMBOL", + "name": "remaining_field_pattern" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "field_pattern" + }, + { + "type": "SYMBOL", + "name": "remaining_field_pattern" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "field_pattern": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "ref" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "shorthand_field_identifier" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_field_identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + } + ] + } + ] + } + ] + }, + "remaining_field_pattern": { + "type": "STRING", + "value": ".." + }, + "mut_pattern": { + "type": "PREC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "range_pattern": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_literal_pattern" + }, + { + "type": "SYMBOL", + "name": "_path" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "..." + }, + { + "type": "STRING", + "value": "..=" + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_literal_pattern" + }, + { + "type": "SYMBOL", + "name": "_path" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ".." + } + ] + } + ] + }, + "ref_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "ref" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + }, + "captured_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "@" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + }, + "reference_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "mutable_specifier" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + }, + "or_pattern": { + "type": "PREC_LEFT", + "value": -2, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + ] + } + }, + "_literal": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string_literal" + }, + { + "type": "SYMBOL", + "name": "raw_string_literal" + }, + { + "type": "SYMBOL", + "name": "char_literal" + }, + { + "type": "SYMBOL", + "name": "boolean_literal" + }, + { + "type": "SYMBOL", + "name": "integer_literal" + }, + { + "type": "SYMBOL", + "name": "float_literal" + } + ] + }, + "_literal_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string_literal" + }, + { + "type": "SYMBOL", + "name": "raw_string_literal" + }, + { + "type": "SYMBOL", + "name": "char_literal" + }, + { + "type": "SYMBOL", + "name": "boolean_literal" + }, + { + "type": "SYMBOL", + "name": "integer_literal" + }, + { + "type": "SYMBOL", + "name": "float_literal" + }, + { + "type": "SYMBOL", + "name": "negative_literal" + } + ] + }, + "negative_literal": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "integer_literal" + }, + { + "type": "SYMBOL", + "name": "float_literal" + } + ] + } + ] + }, + "integer_literal": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9][0-9_]*" + }, + { + "type": "PATTERN", + "value": "0x[0-9a-fA-F_]+" + }, + { + "type": "PATTERN", + "value": "0b[01_]+" + }, + { + "type": "PATTERN", + "value": "0o[0-7_]+" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u8" + }, + { + "type": "STRING", + "value": "i8" + }, + { + "type": "STRING", + "value": "u16" + }, + { + "type": "STRING", + "value": "i16" + }, + { + "type": "STRING", + "value": "u32" + }, + { + "type": "STRING", + "value": "i32" + }, + { + "type": "STRING", + "value": "u64" + }, + { + "type": "STRING", + "value": "i64" + }, + { + "type": "STRING", + "value": "u128" + }, + { + "type": "STRING", + "value": "i128" + }, + { + "type": "STRING", + "value": "isize" + }, + { + "type": "STRING", + "value": "usize" + }, + { + "type": "STRING", + "value": "f32" + }, + { + "type": "STRING", + "value": "f64" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "string_literal": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "[bc]?\"" + }, + "named": false, + "value": "\"" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "string_content" + } + ] + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "\"" + } + } + ] + }, + "raw_string_literal": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_raw_string_literal_start" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "raw_string_literal_content" + }, + "named": true, + "value": "string_content" + }, + { + "type": "SYMBOL", + "name": "_raw_string_literal_end" + } + ] + }, + "char_literal": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "b" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "'" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^xu]" + }, + { + "type": "PATTERN", + "value": "u[0-9a-fA-F]{4}" + }, + { + "type": "PATTERN", + "value": "u\\{[0-9a-fA-F]+\\}" + }, + { + "type": "PATTERN", + "value": "x[0-9a-fA-F]{2}" + } + ] + } + ] + }, + { + "type": "PATTERN", + "value": "[^\\\\']" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "'" + } + ] + } + }, + "escape_sequence": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^xu]" + }, + { + "type": "PATTERN", + "value": "u[0-9a-fA-F]{4}" + }, + { + "type": "PATTERN", + "value": "u\\{[0-9a-fA-F]+\\}" + }, + { + "type": "PATTERN", + "value": "x[0-9a-fA-F]{2}" + } + ] + } + ] + } + }, + "boolean_literal": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "true" + }, + { + "type": "STRING", + "value": "false" + } + ] + }, + "comment": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "line_comment" + }, + { + "type": "SYMBOL", + "name": "block_comment" + } + ] + }, + "line_comment": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "//" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 2, + "content": { + "type": "PATTERN", + "value": "\\/\\/" + } + } + }, + { + "type": "PATTERN", + "value": ".*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_line_doc_comment_marker" + }, + { + "type": "FIELD", + "name": "doc", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_line_doc_content" + }, + "named": true, + "value": "doc_comment" + } + } + ] + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "PATTERN", + "value": ".*" + } + } + } + ] + } + ] + }, + "_line_doc_comment_marker": { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "outer", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_outer_line_doc_comment_marker" + }, + "named": true, + "value": "outer_doc_comment_marker" + } + }, + { + "type": "FIELD", + "name": "inner", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_inner_line_doc_comment_marker" + }, + "named": true, + "value": "inner_doc_comment_marker" + } + } + ] + }, + "_inner_line_doc_comment_marker": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 2, + "content": { + "type": "STRING", + "value": "!" + } + } + }, + "_outer_line_doc_comment_marker": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 2, + "content": { + "type": "STRING", + "value": "/" + } + } + }, + "block_comment": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "/*" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_block_doc_comment_marker" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "doc", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_block_comment_content" + }, + "named": true, + "value": "doc_comment" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "_block_comment_content" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "*/" + } + ] + }, + "_block_doc_comment_marker": { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "outer", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_outer_block_doc_comment_marker" + }, + "named": true, + "value": "outer_doc_comment_marker" + } + }, + { + "type": "FIELD", + "name": "inner", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_inner_block_doc_comment_marker" + }, + "named": true, + "value": "inner_doc_comment_marker" + } + } + ] + }, + "_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "self" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "u8" + }, + { + "type": "STRING", + "value": "i8" + }, + { + "type": "STRING", + "value": "u16" + }, + { + "type": "STRING", + "value": "i16" + }, + { + "type": "STRING", + "value": "u32" + }, + { + "type": "STRING", + "value": "i32" + }, + { + "type": "STRING", + "value": "u64" + }, + { + "type": "STRING", + "value": "i64" + }, + { + "type": "STRING", + "value": "u128" + }, + { + "type": "STRING", + "value": "i128" + }, + { + "type": "STRING", + "value": "isize" + }, + { + "type": "STRING", + "value": "usize" + }, + { + "type": "STRING", + "value": "f32" + }, + { + "type": "STRING", + "value": "f64" + }, + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "str" + }, + { + "type": "STRING", + "value": "char" + } + ] + }, + "named": true, + "value": "identifier" + }, + { + "type": "SYMBOL", + "name": "metavariable" + }, + { + "type": "SYMBOL", + "name": "super" + }, + { + "type": "SYMBOL", + "name": "crate" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "scoped_identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + }, + "identifier": { + "type": "PATTERN", + "value": "(r#)?[_\\p{XID_Start}][_\\p{XID_Continue}]*" + }, + "shebang": { + "type": "PATTERN", + "value": "#![\\s]*[^\\[\\s]+" + }, + "_reserved_identifier": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "default" + }, + { + "type": "STRING", + "value": "union" + } + ] + }, + "named": true, + "value": "identifier" + }, + "_type_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "type_identifier" + }, + "_field_identifier": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "field_identifier" + }, + "self": { + "type": "STRING", + "value": "self" + }, + "super": { + "type": "STRING", + "value": "super" + }, + "crate": { + "type": "STRING", + "value": "crate" + }, + "metavariable": { + "type": "PATTERN", + "value": "\\$[a-zA-Z_]\\w*" + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s" + }, + { + "type": "SYMBOL", + "name": "line_comment" + }, + { + "type": "SYMBOL", + "name": "block_comment" + } + ], + "conflicts": [ + [ + "_type", + "_pattern" + ], + [ + "unit_type", + "tuple_pattern" + ], + [ + "scoped_identifier", + "scoped_type_identifier" + ], + [ + "parameters", + "_pattern" + ], + [ + "parameters", + "tuple_struct_pattern" + ], + [ + "type_parameters", + "for_lifetimes" + ], + [ + "array_expression" + ], + [ + "visibility_modifier" + ], + [ + "visibility_modifier", + "scoped_identifier", + "scoped_type_identifier" + ] + ], + "precedences": [], + "externals": [ + { + "type": "SYMBOL", + "name": "string_content" + }, + { + "type": "SYMBOL", + "name": "_raw_string_literal_start" + }, + { + "type": "SYMBOL", + "name": "raw_string_literal_content" + }, + { + "type": "SYMBOL", + "name": "_raw_string_literal_end" + }, + { + "type": "SYMBOL", + "name": "float_literal" + }, + { + "type": "SYMBOL", + "name": "_outer_block_doc_comment_marker" + }, + { + "type": "SYMBOL", + "name": "_inner_block_doc_comment_marker" + }, + { + "type": "SYMBOL", + "name": "_block_comment_content" + }, + { + "type": "SYMBOL", + "name": "_line_doc_content" + }, + { + "type": "SYMBOL", + "name": "_error_sentinel" + } + ], + "inline": [ + "_path", + "_type_identifier", + "_tokens", + "_field_identifier", + "_non_special_token", + "_declaration_statement", + "_reserved_identifier", + "_expression_ending_with_block" + ], + "supertypes": [ + "_expression", + "_type", + "_literal", + "_literal_pattern", + "_declaration_statement", + "_pattern" + ] +} |
