diff --git a/crates/oxc_parser/src/lexer/kind.rs b/crates/oxc_parser/src/lexer/kind.rs index 4d8f239e9..c80a48711 100644 --- a/crates/oxc_parser/src/lexer/kind.rs +++ b/crates/oxc_parser/src/lexer/kind.rs @@ -360,16 +360,6 @@ impl Kind { matches!(self, Implements | Interface | Package | Private | Protected | Public | Static) } - #[rustfmt::skip] - pub fn is_at_expression(self) -> bool { - self.is_unary_operator() - || self.is_update_operator() - || self.is_reserved_keyword() - || self.is_literal() - || matches!(self, Neq | LParen | LBrack | LCurly | LAngle | Dot3 - | Slash | SlashEq | TemplateHead | NoSubstitutionTemplate | PrivateIdentifier | Ident | Async) - } - pub fn is_template_start_of_tagged_template(self) -> bool { matches!(self, NoSubstitutionTemplate | TemplateHead) } diff --git a/crates/oxc_parser/src/lib.rs b/crates/oxc_parser/src/lib.rs index 63fd7f575..b7f0419dd 100644 --- a/crates/oxc_parser/src/lib.rs +++ b/crates/oxc_parser/src/lib.rs @@ -93,9 +93,8 @@ use oxc_ast::{ use oxc_diagnostics::{OxcDiagnostic, Result}; use oxc_span::{ModuleKind, SourceType, Span}; -pub use crate::lexer::Kind; // re-export for codegen use crate::{ - lexer::{Lexer, Token}, + lexer::{Kind, Lexer, Token}, state::ParserState, }; @@ -105,7 +104,7 @@ use crate::{ // 1. `Span`'s `start` and `end` are `u32`s, which limits length to `u32::MAX` bytes. // 2. Rust's allocator APIs limit allocations to `isize::MAX`. // https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.from_size_align -pub const MAX_LEN: usize = if std::mem::size_of::() >= 8 { +pub(crate) const MAX_LEN: usize = if std::mem::size_of::() >= 8 { // 64-bit systems u32::MAX as usize } else { diff --git a/crates/oxc_span/src/lib.rs b/crates/oxc_span/src/lib.rs index c311a2ed2..d33fc2e35 100644 --- a/crates/oxc_span/src/lib.rs +++ b/crates/oxc_span/src/lib.rs @@ -22,5 +22,5 @@ pub use crate::{ #[doc(hidden)] pub mod __internal { // Used by `format_compact_str!` macro defined in `compact_str.rs` - pub use ::compact_str::format_compact; + pub use compact_str::format_compact; }