2017-12-31 20:27:36 +00:00
|
|
|
extern crate libsyntax2;
|
2018-01-07 11:56:08 +00:00
|
|
|
extern crate testutils;
|
2017-12-31 20:27:36 +00:00
|
|
|
|
2018-07-29 11:37:48 +00:00
|
|
|
use libsyntax2::{tokenize, parse_green};
|
|
|
|
use libsyntax2::utils::{dump_tree_green};
|
2018-01-07 12:34:11 +00:00
|
|
|
use testutils::dir_tests;
|
2017-12-31 20:27:36 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn parser_tests() {
|
2018-02-03 19:34:35 +00:00
|
|
|
dir_tests(&["parser/inline", "parser/ok", "parser/err"], |text| {
|
2018-01-27 23:31:23 +00:00
|
|
|
let tokens = tokenize(text);
|
2018-07-29 10:51:55 +00:00
|
|
|
let file = parse_green(text.to_string(), &tokens);
|
|
|
|
dump_tree_green(&file)
|
2018-01-27 23:31:23 +00:00
|
|
|
})
|
2017-12-31 20:27:36 +00:00
|
|
|
}
|