Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/oxc_codegen/src/binary_expr_visitor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Visit binary and logical expression in a loop without recursion.
//!
//! Reference: <https://github.com/evanw/esbuild/blob/78f89e41d5e8a7088f4820351c6305cc339f8820/internal/js_printer/js_printer.go#L3266>

use std::ops::Not;

use oxc_ast::ast::{BinaryExpression, Expression, LogicalExpression};
Expand Down
1 change: 1 addition & 0 deletions crates/oxc_codegen/src/context.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![expect(missing_docs)] // FIXME

use bitflags::bitflags;

bitflags! {
Expand Down
39 changes: 18 additions & 21 deletions crates/oxc_codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions crates/oxc_codegen/src/sourcemap_builder.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
Loading