misc: remove unused import and format code.

This commit is contained in:
jackfiled 2024-12-01 22:01:36 +08:00
parent dbc56a477b
commit 307af5679b
3 changed files with 3 additions and 7 deletions

View File

@ -58,7 +58,7 @@ where
#[cfg(test)]
mod test {
use crate::combinators::ParserExt;
use crate::parser::{parser_test_helper, Parser, ParserContext};
use crate::parser::{parser_test_helper, Parser};
use crate::text::char_parser;
#[test]

View File

@ -8,8 +8,7 @@ fn validate_tokens(input: &'static str, tokens: Vec<LexicalTokenType>) {
let context = ParserContext::new(());
let word: Vec<char> = input.chars().collect();
let (_, actual_tokens) =
zero_lexical_parser(context.clone(),word.as_slice()).unwrap();
let (_, actual_tokens) = zero_lexical_parser(context.clone(), word.as_slice()).unwrap();
dbg!(&tokens, &actual_tokens);
assert_eq!(tokens.len(), actual_tokens.len());

View File

@ -15,10 +15,7 @@ mod tokenizer;
fn assert_lexical_parser(
except: LexicalToken,
parser: fn(
Rc<RefCell<ParserContext<()>>>,
&[char],
) -> ParserResult<char, NewLexicalToken>,
parser: fn(Rc<RefCell<ParserContext<()>>>, &[char]) -> ParserResult<char, NewLexicalToken>,
input: &str,
) {
let context = ParserContext::new(());