biome_js_formatter 0.0.1

Biome's JavaScript formatter
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! This is a generated file. Don't modify it by hand! Run 'cargo codegen formatter' to re-generate the file.

use crate::prelude::*;
use biome_js_syntax::AnyJsFunction;
#[derive(Debug, Clone, Default)]
pub(crate) struct FormatAnyJsFunction;
impl FormatRule<AnyJsFunction> for FormatAnyJsFunction {
    type Context = JsFormatContext;
    fn fmt(&self, node: &AnyJsFunction, f: &mut JsFormatter) -> FormatResult<()> {
        match node {
            AnyJsFunction::JsFunctionExpression(node) => node.format().fmt(f),
            AnyJsFunction::JsFunctionDeclaration(node) => node.format().fmt(f),
            AnyJsFunction::JsArrowFunctionExpression(node) => node.format().fmt(f),
            AnyJsFunction::JsFunctionExportDefaultDeclaration(node) => node.format().fmt(f),
        }
    }
}