blob: 1a23db5f9f04519a801706f9517d7c11293b1406 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
//! Syntax definition, parsing, and highlighting.
pub mod ast;
pub mod highlight;
mod incremental;
mod kind;
mod node;
mod parser;
mod parsing;
mod resolve;
mod source;
mod span;
mod tokens;
pub use kind::*;
pub use node::*;
pub use parsing::*;
pub use source::*;
pub use span::*;
pub use tokens::*;
use incremental::reparse;
use parser::*;
#[cfg(test)]
mod tests {
use std::fmt::Debug;
#[track_caller]
pub fn check<T>(text: &str, found: T, expected: T)
where
T: Debug + PartialEq,
{
if found != expected {
println!("source: {text:?}");
println!("expected: {expected:#?}");
println!("found: {found:#?}");
panic!("test failed");
}
}
}
|