Forbid tags and price on choice blocks
This commit is contained in:
parent
ad9b55fa4b
commit
b7cc2048d6
2 changed files with 10 additions and 4 deletions
|
@ -28,9 +28,13 @@ location_attribute =
|
||||||
location = >location_header items:{ block } ;
|
location = >location_header items:{ block } ;
|
||||||
|
|
||||||
|
|
||||||
attributes =
|
name_and_description =
|
||||||
name:/[^\n]*?(?= +-- | +:: | +€ |\n)/
|
name:/[^\n]*?(?= +-- | +:: | +€ |\n)/
|
||||||
[ s '--' ~ s description:/[^\n]*?(?= +:: | +€ |\n)/ ]
|
[ s '--' ~ s description:/[^\n]*?(?= +:: | +€ |\n)/ ]
|
||||||
|
;
|
||||||
|
|
||||||
|
attributes =
|
||||||
|
>name_and_description
|
||||||
[ s '::' {s ('{' tags+:identifier '}')} ]
|
[ s '::' {s ('{' tags+:identifier '}')} ]
|
||||||
[ [ s '::' ~ ] s price:price ]
|
[ [ s '::' ~ ] s price:price ]
|
||||||
;
|
;
|
||||||
|
@ -56,7 +60,7 @@ indent_choice_entry = n '\t\t' >choice_entry ;
|
||||||
|
|
||||||
# Toplevel choice definitions
|
# Toplevel choice definitions
|
||||||
choice_block =
|
choice_block =
|
||||||
id:identifier ':' s >attributes entries:{ noindent_choice_entry }
|
id:identifier ':' s >name_and_description entries:{ noindent_choice_entry }
|
||||||
n
|
n
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -66,7 +70,7 @@ choice_block =
|
||||||
indent_choice_block =
|
indent_choice_block =
|
||||||
'\t' type:choice_type s
|
'\t' type:choice_type s
|
||||||
(
|
(
|
||||||
| kind:`declaration` id:identifier ':' ~ s >attributes entries:{ indent_choice_entry }
|
| kind:`declaration` id:identifier ':' ~ s >name_and_description entries:{ indent_choice_entry }
|
||||||
| kind:`reference` id:identifier [ s price:price ]
|
| kind:`reference` id:identifier [ s price:price ]
|
||||||
)
|
)
|
||||||
n
|
n
|
||||||
|
|
|
@ -24,8 +24,10 @@ sauce: Saus
|
||||||
stew: Stoofvleessaus :: {has_meat} € 0.5
|
stew: Stoofvleessaus :: {has_meat} € 0.5
|
||||||
other: Andere (in commentaar)
|
other: Andere (in commentaar)
|
||||||
|
|
||||||
extra_cheese: Extra kaas € 0.2
|
extra_cheese: Extra kaas
|
||||||
# FIXME extra kaas waarop?
|
# FIXME extra kaas waarop?
|
||||||
|
no_extra_cheese: Nee
|
||||||
|
yes_extra_cheese: Ja € 0.2
|
||||||
|
|
||||||
dish chicken_fingers: Kippenvingers :: {has_meat} € 3
|
dish chicken_fingers: Kippenvingers :: {has_meat} € 3
|
||||||
dish nuggiz: Nuggiz :: {has_meat} € 3
|
dish nuggiz: Nuggiz :: {has_meat} € 3
|
||||||
|
|
Loading…
Reference in a new issue