Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
Fix codegen for unknown nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Sep 16, 2022
1 parent e647d6e commit 4327f88
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions xtask/codegen/src/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,18 +357,13 @@ pub fn generate_formatter() {
}
NodeKind::Unknown => {
quote! {
use crate::prelude::*;
use crate::{FormatNodeFields};
use rome_rowan::AstNode;
use crate::FormatUnknownNodeRule;
use rome_js_syntax::#node_id;

#[derive(Debug, Clone, Default)]
pub struct #format_id;

impl FormatNodeRule<#node_id> for #format_id {
fn fmt_fields(&self, node: &#node_id, f: &mut JsFormatter) -> FormatResult<()> {
format_unknown_node(node.syntax()).fmt(f)
}
impl FormatUnknownNodeRule<#node_id> for #format_id {
}
}
}
Expand Down

0 comments on commit 4327f88

Please sign in to comment.