cooklang / cookcli

Command line program which provides a suite of tools to create shopping lists and maintain recipes.
https://cooklang.org
MIT License
781 stars 38 forks source link

Cookware Quantity Bug #61

Closed nicholaswilde closed 1 year ago

nicholaswilde commented 2 years ago

The cooklang spec states that quantity for cookware is supported. However, when running it, the output shows a warning.

Actual Output

$ cook recipe read << EOF
#test{1}
EOF
Warning: expected '}' but got 1
Ingredients:

Cookware:
    test

Steps:
     1. test1}
        [–]

Expected Output

$ cook recipe read << EOF
#test{1}
EOF
Cookware:
    test                          1

Steps:
     1. test
        [–]

EBNF

...
cookware             = one word cookware | multiword cookware ;
+one word cookware    = "#", ( word,                     [ "{", [ quantity ], "}" ] ) ;
multiword cookware   = "#", ( word, { text item - "{" }-, "{", [ quantity ], "}" ) ;
...
$ cook version
v0.1.4 – in food we trust
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:        22.04
Codename:       jammy
dubadub commented 1 year ago

This was fixed after migration to Rust parser.