Debian Codegraph @

tests/compile-fail/rule_args_errors.rs

raw symbols SCIP
1 extern crate peg;
2
3 peg::parser!(grammar foo() for str {
4 rule foo(x: i32, y: rule<()>) = "foo"
5 rule ok() = foo(1, <[_] {}>)
6
7 rule too_few() = foo(1) //~ ERROR
8 rule too_many() = foo(1, <[_] {}>, 2) //~ ERROR
9
10 pub rule pub_rule_arg(x: rule<()>) = "foo" //~ ERROR
11 });
12
13 fn main() {}