From 1d657134eaa5a6f6c06711acd7a9722e566f8c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Barr=C3=A9?= Date: Mon, 4 Mar 2024 04:34:42 +0100 Subject: [PATCH] fix(ast): expose NumericLiteral.raw (#2588) This is needed for Prettier to preserve the base when printing numbers. This is not in the spec but available in both Babel and TSESLint. --- crates/oxc_ast/src/ast/literal.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/oxc_ast/src/ast/literal.rs b/crates/oxc_ast/src/ast/literal.rs index ce906703a..60af90a05 100644 --- a/crates/oxc_ast/src/ast/literal.rs +++ b/crates/oxc_ast/src/ast/literal.rs @@ -61,7 +61,6 @@ pub struct NumericLiteral<'a> { #[cfg_attr(feature = "serde", serde(flatten))] pub span: Span, pub value: f64, - #[cfg_attr(feature = "serde", serde(skip))] pub raw: &'a str, #[cfg_attr(feature = "serde", serde(skip))] pub base: NumberBase,