diff --git a/crates/oxc_codegen/src/binary_expr_visitor.rs b/crates/oxc_codegen/src/binary_expr_visitor.rs index 3813939f7e1b9..77154c5512ffb 100644 --- a/crates/oxc_codegen/src/binary_expr_visitor.rs +++ b/crates/oxc_codegen/src/binary_expr_visitor.rs @@ -1,6 +1,7 @@ //! Visit binary and logical expression in a loop without recursion. //! //! Reference: + use std::ops::Not; use oxc_ast::ast::{BinaryExpression, Expression, LogicalExpression}; diff --git a/crates/oxc_codegen/src/context.rs b/crates/oxc_codegen/src/context.rs index f8c3a17e39283..88d4a6d261f45 100644 --- a/crates/oxc_codegen/src/context.rs +++ b/crates/oxc_codegen/src/context.rs @@ -1,4 +1,5 @@ #![expect(missing_docs)] // FIXME + use bitflags::bitflags; bitflags! { diff --git a/crates/oxc_codegen/src/lib.rs b/crates/oxc_codegen/src/lib.rs index 8f39ca3d48ff0..4ce3ab465cba2 100644 --- a/crates/oxc_codegen/src/lib.rs +++ b/crates/oxc_codegen/src/lib.rs @@ -9,15 +9,6 @@ use std::{borrow::Cow, cmp, slice}; use cow_utils::CowUtils; -mod binary_expr_visitor; -mod comment; -mod context; -mod r#gen; -mod operator; -mod options; -mod sourcemap_builder; -mod str; - use oxc_ast::ast::*; use oxc_data_structures::{code_buffer::CodeBuffer, stack::Stack}; use oxc_semantic::Scoping; @@ -28,18 +19,24 @@ use oxc_syntax::{ precedence::Precedence, }; -use crate::{ - binary_expr_visitor::BinaryExpressionVisitor, - comment::CommentsMap, - operator::Operator, - sourcemap_builder::SourcemapBuilder, - str::{Quote, cold_branch, is_script_close_tag}, -}; -pub use crate::{ - context::Context, - r#gen::{Gen, GenExpr}, - options::{CodegenOptions, CommentOptions, LegalComment}, -}; +mod binary_expr_visitor; +mod comment; +mod context; +mod r#gen; +mod operator; +mod options; +mod sourcemap_builder; +mod str; + +use binary_expr_visitor::BinaryExpressionVisitor; +use comment::CommentsMap; +use operator::Operator; +use sourcemap_builder::SourcemapBuilder; +use str::{Quote, cold_branch, is_script_close_tag}; + +pub use context::Context; +pub use r#gen::{Gen, GenExpr}; +pub use options::{CodegenOptions, CommentOptions, LegalComment}; // Re-export `IndentChar` from `oxc_data_structures` pub use oxc_data_structures::code_buffer::IndentChar; diff --git a/crates/oxc_codegen/src/sourcemap_builder.rs b/crates/oxc_codegen/src/sourcemap_builder.rs index d4e0054946590..d6cb6abb1555b 100644 --- a/crates/oxc_codegen/src/sourcemap_builder.rs +++ b/crates/oxc_codegen/src/sourcemap_builder.rs @@ -1,6 +1,7 @@ use std::path::Path; use nonmax::NonMaxU32; + use oxc_index::{Idx, IndexVec}; use oxc_span::Span; use oxc_syntax::identifier::{LS, PS};