Skip to content
Merged
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
6 changes: 0 additions & 6 deletions crates/oxc_ast/src/ast_impl/literal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use std::{
use oxc_allocator::CloneIn;
use oxc_regular_expression::ast::Pattern;
use oxc_span::{cmp::ContentEq, hash::ContentHash, Atom, Span};
use oxc_syntax::number::NumberBase;

use crate::ast::*;

Expand Down Expand Up @@ -59,11 +58,6 @@ impl fmt::Display for NullLiteral {
}

impl<'a> NumericLiteral<'a> {
/// Create a numeric literal representing the given `value`.
pub fn new(span: Span, value: f64, raw: &'a str, base: NumberBase) -> Self {
Self { span, value, raw, base }
}

/// port from [closure compiler](https://github.com/google/closure-compiler/blob/a4c880032fba961f7a6c06ef99daa3641810bfdd/src/com/google/javascript/jscomp/base/JSCompDoubles.java#L113)
///
/// <https://262.ecma-international.org/5.1/#sec-9.5>
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_parser/src/js/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl<'a> ParserImpl<'a> {
_ => return Err(self.unexpected()),
};
self.bump_any();
Ok(NumericLiteral::new(self.end_span(span), value, src, base))
Ok(self.ast.numeric_literal(self.end_span(span), value, src, base))
}

pub(crate) fn parse_literal_bigint(&mut self) -> Result<BigIntLiteral<'a>> {
Expand Down