aboutsummaryrefslogtreecommitdiff
path: root/tests/parser.rs
blob: 37c9021eff297e2b18422a47f6f4c0028ff52a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate file;
extern crate libsyntax2;
extern crate testutils;

use libsyntax2::{parse, tokenize};
use libsyntax2::utils::dump_tree;
use testutils::dir_tests;

#[test]
fn parser_tests() {
    dir_tests(&["parser/ok", "parser/err"], |text| {
        let tokens = tokenize(text);
        let file = parse(text.to_string(), &tokens);
        dump_tree(&file)
    })
}