Break down rustpython_parser::error module

because it doesn't share any common errors but specific error for each sub module
This commit is contained in:
Jeong YunWon 2023-02-22 16:16:12 +09:00
parent 2a8aa6f308
commit 1511b6631b
7 changed files with 338 additions and 345 deletions

View file

@ -1,7 +1,7 @@
// Contains functions that perform validation and parsing of arguments and parameters.
// Checks apply both to functions and to lambdas.
use crate::ast;
use crate::error::{LexicalError, LexicalErrorType};
use crate::lexer::{LexicalError, LexicalErrorType};
use rustc_hash::FxHashSet;
pub(crate) struct ArgumentList {
@ -149,8 +149,8 @@ fn is_starred(exp: &ast::Expr) -> bool {
#[cfg(test)]
mod tests {
use crate::error::{LexicalErrorType, ParseErrorType};
use crate::parser::parse_program;
use crate::lexer::LexicalErrorType;
use crate::parser::{parse_program, ParseErrorType};
macro_rules! function_and_lambda {
($($name:ident: $code:expr,)*) => {