Skip to content
Closed
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
2 changes: 1 addition & 1 deletion crates/oxc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mod trivia;

mod generated {
#[cfg(debug_assertions)]
pub mod assert_layouts;
pub mod assert_unordered_layouts;
pub mod ast_builder;
pub mod ast_kind;
pub mod span;
Expand Down
7 changes: 4 additions & 3 deletions tasks/ast_codegen/src/generators/assert_layouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ use crate::{

use super::generated_header;

pub struct AssertLayouts;
pub struct AssertLayouts(pub &'static str);

impl Generator for AssertLayouts {
fn name(&self) -> &'static str {
stringify!(AssertLayouts)
self.0
}

fn generate(&mut self, ctx: &CodegenCtx) -> GeneratorOutput {
let (assertions_64, assertions_32) = ctx
.schema
.borrow()
.definitions
.iter()
.map(|def| {
Expand Down Expand Up @@ -52,7 +53,7 @@ impl Generator for AssertLayouts {
let header = generated_header!();

GeneratorOutput::Stream((
output(crate::AST_CRATE, "assert_layouts.rs"),
output(crate::AST_CRATE, self.0),
quote! {
#header

Expand Down
Loading