refactor(ast): remove excess line breaks from generated code (#8830)

Pure refactor. Just remove excess line breaks.
This commit is contained in:
overlookmotel 2025-02-01 20:05:17 +00:00
parent 30eec26c4a
commit 0568210f78
10 changed files with 2 additions and 26 deletions

View file

@ -6,13 +6,9 @@
use oxc_allocator::{Allocator, CloneIn}; use oxc_allocator::{Allocator, CloneIn};
use crate::ast::comment::*; use crate::ast::comment::*;
use crate::ast::js::*; use crate::ast::js::*;
use crate::ast::jsx::*; use crate::ast::jsx::*;
use crate::ast::literal::*; use crate::ast::literal::*;
use crate::ast::ts::*; use crate::ast::ts::*;
impl<'alloc> CloneIn<'alloc> for BooleanLiteral { impl<'alloc> CloneIn<'alloc> for BooleanLiteral {

View file

@ -6,13 +6,9 @@
use oxc_span::cmp::ContentEq; use oxc_span::cmp::ContentEq;
use crate::ast::comment::*; use crate::ast::comment::*;
use crate::ast::js::*; use crate::ast::js::*;
use crate::ast::jsx::*; use crate::ast::jsx::*;
use crate::ast::literal::*; use crate::ast::literal::*;
use crate::ast::ts::*; use crate::ast::ts::*;
impl ContentEq for BooleanLiteral { impl ContentEq for BooleanLiteral {

View file

@ -6,11 +6,8 @@
use serde::{ser::SerializeMap, Serialize, Serializer}; use serde::{ser::SerializeMap, Serialize, Serializer};
use crate::ast::js::*; use crate::ast::js::*;
use crate::ast::jsx::*; use crate::ast::jsx::*;
use crate::ast::literal::*; use crate::ast::literal::*;
use crate::ast::ts::*; use crate::ast::ts::*;
impl Serialize for BooleanLiteral { impl Serialize for BooleanLiteral {

View file

@ -6,9 +6,7 @@
use oxc_allocator::{Address, GetAddress}; use oxc_allocator::{Address, GetAddress};
use crate::ast::js::*; use crate::ast::js::*;
use crate::ast::jsx::*; use crate::ast::jsx::*;
use crate::ast::ts::*; use crate::ast::ts::*;
impl GetAddress for Expression<'_> { impl GetAddress for Expression<'_> {

View file

@ -6,11 +6,8 @@
use oxc_span::{GetSpan, Span}; use oxc_span::{GetSpan, Span};
use crate::ast::js::*; use crate::ast::js::*;
use crate::ast::jsx::*; use crate::ast::jsx::*;
use crate::ast::literal::*; use crate::ast::literal::*;
use crate::ast::ts::*; use crate::ast::ts::*;
impl GetSpan for BooleanLiteral { impl GetSpan for BooleanLiteral {

View file

@ -6,11 +6,8 @@
use oxc_span::{GetSpanMut, Span}; use oxc_span::{GetSpanMut, Span};
use crate::ast::js::*; use crate::ast::js::*;
use crate::ast::jsx::*; use crate::ast::jsx::*;
use crate::ast::literal::*; use crate::ast::literal::*;
use crate::ast::ts::*; use crate::ast::ts::*;
impl GetSpanMut for BooleanLiteral { impl GetSpanMut for BooleanLiteral {

View file

@ -6,7 +6,6 @@
use serde::{ser::SerializeMap, Serialize, Serializer}; use serde::{ser::SerializeMap, Serialize, Serializer};
use crate::source_type::*; use crate::source_type::*;
use crate::span::types::*; use crate::span::types::*;
impl Serialize for Span { impl Serialize for Span {

View file

@ -6,7 +6,6 @@
use oxc_allocator::{Allocator, CloneIn}; use oxc_allocator::{Allocator, CloneIn};
use crate::number::*; use crate::number::*;
use crate::operator::*; use crate::operator::*;
impl<'alloc> CloneIn<'alloc> for NumberBase { impl<'alloc> CloneIn<'alloc> for NumberBase {

View file

@ -6,7 +6,6 @@
use oxc_span::cmp::ContentEq; use oxc_span::cmp::ContentEq;
use crate::number::*; use crate::number::*;
use crate::operator::*; use crate::operator::*;
impl ContentEq for NumberBase { impl ContentEq for NumberBase {

View file

@ -52,15 +52,13 @@ pub trait Derive {
.chain(["*"]) .chain(["*"])
.join("::"); .join("::");
let use_module: ItemUse = parse_str(format!("use {local_path};").as_str()).unwrap(); let use_module: ItemUse = parse_str(format!("use {local_path};").as_str()).unwrap();
quote! { quote!( #use_module )
///@@line_break
#use_module
}
}); });
quote! { quote! {
#prelude #prelude
///@@line_break
#(#use_modules)* #(#use_modules)*
///@@line_break ///@@line_break