summaryrefslogtreecommitdiff
path: root/cook
diff options
context:
space:
mode:
Diffstat (limited to 'cook')
-rw-r--r--cook/parse.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/cook/parse.scm b/cook/parse.scm
index 2ccc4a6..57c5178 100644
--- a/cook/parse.scm
+++ b/cook/parse.scm
@@ -132,14 +132,16 @@ https://github.com/cooklang/spec/blob/main/EBNF.md
((=> q ,quantity)
(make-amount q #f)))
- (no-word-component ((: "{" (? (=> a ,amount)) "}")
+ (amount-block ((: "{" (? (=> a ,amount)) "}")
+ a))
+ (no-word-component ((: (=> a ,amount-block))
(make-component #f a)))
(component-word ((=> w (+ ,component-word-chars))
(list->string w)))
(component ((: (=> cw ,component-word)
(? (: (=> cc (* ,component-chars))
- "{" (? (=> a ,amount)) "}")))
+ (=> a ,amount-block))))
(make-component
(string-append cw (if cc (list->string cc) ""))
a)))