X-Git-Url: https://git.r.bdr.sh/rbdr/tree-sitter-api-notation/blobdiff_plain/dc87cd894bad9ad0202dcd4a89e7d0af47c53fc9..3f76f5f4a42a1b233c6c3a981cea0a4186dc6fb0:/src/grammar.json diff --git a/src/grammar.json b/src/grammar.json index 1d2d121..097ee85 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,5 +1,5 @@ { - "name": "apinotation", + "name": "api_notation", "rules": { "source_file": { "type": "REPEAT", @@ -316,8 +316,17 @@ "type": "SEQ", "members": [ { - "type": "SYMBOL", - "name": "_label" + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "optional_value" + }, + { + "type": "SYMBOL", + "name": "_label" + } + ] }, { "type": "CHOICE", @@ -370,6 +379,23 @@ ] } }, + "optional_value": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, "type_annotation": { "type": "SEQ", "members": [