summaryrefslogtreecommitdiffstats
path: root/crates/rebel-parse/src/grammar/recipe.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rebel-parse/src/grammar/recipe.rs')
-rw-r--r--crates/rebel-parse/src/grammar/recipe.rs8
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 2888374..633b021 100644
--- a/crates/rebel-parse/src/grammar/recipe.rs
+++ b/crates/rebel-parse/src/grammar/recipe.rs
@@ -4,7 +4,7 @@ use crate::token::*;
pub use rules::*;
peg::parser! {
- pub grammar rules<'a>() for [Token<'a>] {
+ pub grammar rules<'a>() for TokenStream<'a> {
use ast::OpBinary::*;
use ast::OpUnary::*;
@@ -126,10 +126,10 @@ peg::parser! {
}
rule p_(ch: char)
- = [Token::Punct(Punct(c, Spacing::Joint)) if c == ch] {}
+ = [Token::Punct(Punct(c, Spacing::Joint)) if *c == ch] {}
rule p(ch: char) -> ()
- = [Token::Punct(Punct(c, _)) if c == ch] {}
+ = [Token::Punct(Punct(c, _)) if *c == ch] {}
rule p2(ch1: char, ch2: char)
= p_(ch1) p(ch2)
@@ -153,7 +153,7 @@ peg::parser! {
= const_ident("task")
rule const_ident(keyword: &str)
- = [Token::Ident(name) if keyword == name]
+ = [Token::Ident(name) if *name == keyword]
rule delimited<T>(expr: rule<T>, delim: rule<()>) -> Vec<T>
= values:(expr() ++ delim()) delim()? { values }