diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-10-04 14:06:17 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-10-04 14:06:17 +0200 |
| commit | 4a1d56285559545a56cb7c79a0ea1564f01e09e5 (patch) | |
| tree | a600684f681d4b8c401ab1fc9d2a770ac5ea56d7 /src/grammar.json | |
| parent | 0931d6ef75e5dc37ba6bd7bb92c369d1df99e6d3 (diff) | |
Add optionals
Diffstat (limited to 'src/grammar.json')
| -rw-r--r-- | src/grammar.json | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/grammar.json b/src/grammar.json index 1d2d121..e25308a 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -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": [ |