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.
This commit is contained in:
Arnaud Barré 2024-03-04 04:34:42 +01:00 committed by GitHub
parent 9d4e255a73
commit 1d657134ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,