cargo-play/fixtures/infer-override.rs

16 lines
338 B
Rust
Raw Normal View History

2019-08-21 05:03:54 +00:00
//# regex-syntax = "*"
use regex_syntax::hir::{self, Hir};
use regex_syntax::Parser;
fn main() {
let hir = Parser::new().parse("a|b").unwrap();
assert_eq!(
hir,
Hir::alternation(vec![
Hir::literal(hir::Literal::Unicode('a')),
Hir::literal(hir::Literal::Unicode('b')),
])
);
}