Skip to content

Commit af065ff

Browse files
committed
style(codegen): re-order imports (#12918)
1 parent 9d946aa commit af065ff

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

crates/oxc_codegen/src/binary_expr_visitor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Visit binary and logical expression in a loop without recursion.
22
//!
33
//! Reference: <https://github.com/evanw/esbuild/blob/78f89e41d5e8a7088f4820351c6305cc339f8820/internal/js_printer/js_printer.go#L3266>
4+
45
use std::ops::Not;
56

67
use oxc_ast::ast::{BinaryExpression, Expression, LogicalExpression};

crates/oxc_codegen/src/context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![expect(missing_docs)] // FIXME
2+
23
use bitflags::bitflags;
34

45
bitflags! {

crates/oxc_codegen/src/lib.rs

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@ use std::{borrow::Cow, cmp, slice};
99

1010
use cow_utils::CowUtils;
1111

12-
mod binary_expr_visitor;
13-
mod comment;
14-
mod context;
15-
mod r#gen;
16-
mod operator;
17-
mod options;
18-
mod sourcemap_builder;
19-
mod str;
20-
2112
use oxc_ast::ast::*;
2213
use oxc_data_structures::{code_buffer::CodeBuffer, stack::Stack};
2314
use oxc_semantic::Scoping;
@@ -28,18 +19,24 @@ use oxc_syntax::{
2819
precedence::Precedence,
2920
};
3021

31-
use crate::{
32-
binary_expr_visitor::BinaryExpressionVisitor,
33-
comment::CommentsMap,
34-
operator::Operator,
35-
sourcemap_builder::SourcemapBuilder,
36-
str::{Quote, cold_branch, is_script_close_tag},
37-
};
38-
pub use crate::{
39-
context::Context,
40-
r#gen::{Gen, GenExpr},
41-
options::{CodegenOptions, CommentOptions, LegalComment},
42-
};
22+
mod binary_expr_visitor;
23+
mod comment;
24+
mod context;
25+
mod r#gen;
26+
mod operator;
27+
mod options;
28+
mod sourcemap_builder;
29+
mod str;
30+
31+
use binary_expr_visitor::BinaryExpressionVisitor;
32+
use comment::CommentsMap;
33+
use operator::Operator;
34+
use sourcemap_builder::SourcemapBuilder;
35+
use str::{Quote, cold_branch, is_script_close_tag};
36+
37+
pub use context::Context;
38+
pub use r#gen::{Gen, GenExpr};
39+
pub use options::{CodegenOptions, CommentOptions, LegalComment};
4340

4441
// Re-export `IndentChar` from `oxc_data_structures`
4542
pub use oxc_data_structures::code_buffer::IndentChar;

crates/oxc_codegen/src/sourcemap_builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::path::Path;
22

33
use nonmax::NonMaxU32;
4+
45
use oxc_index::{Idx, IndexVec};
56
use oxc_span::Span;
67
use oxc_syntax::identifier::{LS, PS};

0 commit comments

Comments
 (0)