mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-16 07:03:57 +00:00
15 lines
394 B
Rust
15 lines
394 B
Rust
extern crate libsyntax2;
|
|
extern crate testutils;
|
|
|
|
use libsyntax2::{tokenize, parse_green};
|
|
use libsyntax2::utils::{dump_tree_green};
|
|
use testutils::dir_tests;
|
|
|
|
#[test]
|
|
fn parser_tests() {
|
|
dir_tests(&["parser/inline", "parser/ok", "parser/err"], |text| {
|
|
let tokens = tokenize(text);
|
|
let file = parse_green(text.to_string(), &tokens);
|
|
dump_tree_green(&file)
|
|
})
|
|
}
|