File: nullable_loop.rs

package info (click to toggle)
rust-peg 0.8.5-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 756 kB
  • sloc: makefile: 20; sh: 12
file content (13 lines) | stat: -rw-r--r-- 258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
peg::parser!(grammar e() for str {
    rule nested() = ("a"*)* //~ ERROR

    rule nested_ok() = ("a"+)*

    rule nullable() = "x"?

    rule call() = "foo" nullable()* //~ ERROR

    rule more_complex() = ("x" / "a"? "b"?)*<2,> //~ ERROR
});

fn main() {}