Skip to content

Commit

Permalink
refactor(prettier): Refactor IR related macros (#7491)
Browse files Browse the repository at this point in the history
- Remove `format!` macro
- Rename string related macros, `&'static`: `text!` and `'a`: `dynamic_text!`
- Apply `wrap!` macro instead of manually using `enter|leave_node`
- Introduce `/ir` directory and move `Doc`, `impl Display`, `DocBuilder`, etc.

I'm not yet determined how to, how deep to use macro, but this is first stepping stone... 🥌
  • Loading branch information
leaysgur committed Nov 26, 2024
1 parent 8d89fdc commit 3a1ef6a
Show file tree
Hide file tree
Showing 29 changed files with 970 additions and 942 deletions.
2 changes: 1 addition & 1 deletion crates/oxc_prettier/src/comments/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use oxc_allocator::Vec;
use oxc_span::Span;

use crate::{
doc::{Doc, DocBuilder},
ir::{Doc, DocBuilder},
Prettier,
};

Expand Down
344 changes: 0 additions & 344 deletions crates/oxc_prettier/src/doc.rs

This file was deleted.

Loading

0 comments on commit 3a1ef6a

Please sign in to comment.