Debian Codegraph @

tests/run-pass/utf8.rs

raw symbols SCIP
1 extern crate peg;
2
3 peg::parser!(grammar test_grammar() for str {
4 pub rule boundaries() -> String
5 = n:$("foo") { n.to_string() }
6 });
7
8 use self::test_grammar::*;
9
10 // before we were testing string matches using .slice(), which
11 // threw an ugly panic!() when we compared unequal character
12 // boundaries.. this popped up while parsing unicode
13 fn main() {
14 assert!(boundaries("f↙↙↙↙").is_err());
15 }