Skip to content

Commit

Permalink
refactor(codegen)!: rename print_char method to print_ascii_byte (#…
Browse files Browse the repository at this point in the history
…6512)

`print_ascii_byte` is more descriptive of what this method does, and makes clear the invariant that `byte` must be ASCII.
  • Loading branch information
overlookmotel committed Oct 13, 2024
1 parent 05a2ebd commit 782f0a7
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 164 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_codegen/src/binary_expr_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl<'a> BinaryExpressionVisitor<'a> {
&& self.ctx.intersects(Context::FORBID_IN));

if self.wrap {
p.print_char(b'(');
p.print_ascii_byte(b'(');
self.ctx &= Context::FORBID_IN.not();
}

Expand Down Expand Up @@ -200,7 +200,7 @@ impl<'a> BinaryExpressionVisitor<'a> {
p.print_soft_space();
self.e.right().gen_expr(p, self.right_precedence, self.ctx & Context::FORBID_IN);
if self.wrap {
p.print_char(b')');
p.print_ascii_byte(b')');
}
}
}
Loading

0 comments on commit 782f0a7

Please sign in to comment.