mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-08 20:58:05 +00:00
Move token and error structs into related modules (#11957)
## Summary This PR does some housekeeping into moving certain structs into related modules. Specifically, 1. Move `LexicalError` from `lexer.rs` to `error.rs` which also contains the `ParseError` 2. Move `Token`, `TokenFlags` and `TokenValue` from `lexer.rs` to `token.rs`
This commit is contained in:
parent
4667d8697c
commit
96da136e6a
10 changed files with 352 additions and 342 deletions
|
@ -67,8 +67,7 @@
|
|||
use std::ops::Deref;
|
||||
|
||||
pub use crate::error::{FStringErrorType, ParseError, ParseErrorType};
|
||||
pub use crate::lexer::Token;
|
||||
pub use crate::token::TokenKind;
|
||||
pub use crate::token::{Token, TokenKind};
|
||||
|
||||
use crate::parser::Parser;
|
||||
|
||||
|
@ -592,7 +591,7 @@ impl std::fmt::Display for ModeParseError {
|
|||
mod tests {
|
||||
use std::ops::Range;
|
||||
|
||||
use crate::lexer::TokenFlags;
|
||||
use crate::token::TokenFlags;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue