diff options
Diffstat (limited to 'crates/rebel-parse/src/grammar/recipe.rs')
-rw-r--r-- | crates/rebel-parse/src/grammar/recipe.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/rebel-parse/src/grammar/recipe.rs b/crates/rebel-parse/src/grammar/recipe.rs index 9b79d41..6c52367 100644 --- a/crates/rebel-parse/src/grammar/recipe.rs +++ b/crates/rebel-parse/src/grammar/recipe.rs @@ -92,17 +92,17 @@ peg::parser! { = name:ident() p(':') typ:expr() { ast::FuncParam { name, typ } } rule literal() -> ast::Literal<'a> - = keyword_true() { ast::Literal::Boolean(true) } - / keyword_false() { ast::Literal::Boolean(false) } + = keyword_true() { ast::Literal::Bool(true) } + / keyword_false() { ast::Literal::Bool(false) } / [Token::Number(content)] { ? ast::Literal::number(content) } - / [Token::String(String { pieces, kind })] { ? + / [Token::Str(Str { pieces, kind })] { ? let pieces = pieces .iter() .map(|piece| piece.try_into()) .collect::<Result<_, _>>()?; - Ok(ast::Literal::String{ pieces, kind: *kind }) + Ok(ast::Literal::Str{ pieces, kind: *kind }) } / p('(') p(')') { ast::Literal::Unit } / p('(') elements:(expr() ** p(',')) p(',')? p(')') { |