summaryrefslogtreecommitdiff
path: root/src/parse/tokens.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-01-31 13:26:40 +0100
committerLaurenz <laurmaedje@gmail.com>2022-01-31 13:26:52 +0100
commit8f37189d6fb2e3c75e4e6a168e1ae17c568fdc4c (patch)
tree36d0201961766fa53d4193f2b91a0a27ac1826ad /src/parse/tokens.rs
parentb1a82ae22d819eaa81a5e1d0ece58e6b4717dda5 (diff)
Fix incremental parsing bugs
Diffstat (limited to 'src/parse/tokens.rs')
-rw-r--r--src/parse/tokens.rs16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/parse/tokens.rs b/src/parse/tokens.rs
index d741dea1..27da3b80 100644
--- a/src/parse/tokens.rs
+++ b/src/parse/tokens.rs
@@ -568,9 +568,8 @@ fn keyword(ident: &str) -> Option<NodeKind> {
#[cfg(test)]
#[allow(non_snake_case)]
mod tests {
- use std::fmt::Debug;
-
use super::*;
+ use crate::parse::tests::check;
use ErrorPos::*;
use NodeKind::*;
@@ -687,19 +686,6 @@ mod tests {
}};
}
- #[track_caller]
- fn check<T>(src: &str, found: T, expected: T)
- where
- T: Debug + PartialEq,
- {
- if found != expected {
- println!("source: {src:?}");
- println!("expected: {expected:#?}");
- println!("found: {found:#?}");
- panic!("test failed");
- }
- }
-
#[test]
fn test_tokenize_brackets() {
// Test in markup.