X-Git-Url: https://git.r.bdr.sh/rbdr/tree-sitter-api-notation/blobdiff_plain/dc87cd894bad9ad0202dcd4a89e7d0af47c53fc9..b95c61865da09bf2e98eeb62c82c914f21e36903:/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": [