Skip to content

Commit

Permalink
refactor(ast_codegen): consistent import order (#4761)
Browse files Browse the repository at this point in the history
Pure refactor. Alter import order in generated code to consistent order - `std`, external crates, `crate`, `super`.
  • Loading branch information
overlookmotel committed Aug 8, 2024
1 parent 41f861f commit 2dea0ca
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion crates/oxc_ast/src/generated/assert_layouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

use std::mem::{align_of, offset_of, size_of};

use crate::ast::*;
use oxc_span::*;
use oxc_syntax::{number::*, operator::*};

use crate::ast::*;

#[cfg(target_pointer_width = "64")]
const _: () = {
assert!(size_of::<BooleanLiteral>() == 12usize);
Expand Down
3 changes: 2 additions & 1 deletion crates/oxc_ast/src/generated/ast_kind.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Auto-generated code, DO NOT EDIT DIRECTLY!
// To edit this generated file you have to edit `tasks/ast_codegen/src/generators/ast_kind.rs`

use crate::ast::*;
use oxc_span::{GetSpan, Span};

use crate::ast::*;

#[derive(Debug, Clone, Copy)]
pub enum AstType {
BooleanLiteral,
Expand Down
4 changes: 2 additions & 2 deletions tasks/ast_codegen/src/generators/assert_layouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ impl Generator for AssertLayouts {

endl!();

use crate::ast::*;
use oxc_span::*;
use oxc_syntax::{number::*, operator::*};
endl!();


use crate::ast::*;
endl!();

#[cfg(target_pointer_width = "64")]
Expand Down
3 changes: 2 additions & 1 deletion tasks/ast_codegen/src/generators/ast_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ impl Generator for AstKindGenerator {
quote! {
#header

use crate::ast::*;
use oxc_span::{GetSpan, Span};
endl!();

use crate::ast::*;
endl!();

#[derive(Debug, Clone, Copy)]
Expand Down

0 comments on commit 2dea0ca

Please sign in to comment.