Skip to content

Commit

Permalink
fix(ast): rename all instances of BigintLiteral to BigIntLiteral.
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa committed Jun 25, 2024
1 parent 7c0c756 commit 66c4d42
Show file tree
Hide file tree
Showing 26 changed files with 66 additions and 66 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_ast/src/ast/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub enum Expression<'a> {
BooleanLiteral(Box<'a, BooleanLiteral>) = 0,
NullLiteral(Box<'a, NullLiteral>) = 1,
NumericLiteral(Box<'a, NumericLiteral<'a>>) = 2,
BigintLiteral(Box<'a, BigIntLiteral<'a>>) = 3,
BigIntLiteral(Box<'a, BigIntLiteral<'a>>) = 3,
RegExpLiteral(Box<'a, RegExpLiteral<'a>>) = 4,
StringLiteral(Box<'a, StringLiteral<'a>>) = 5,
TemplateLiteral(Box<'a, TemplateLiteral<'a>>) = 6,
Expand Down Expand Up @@ -110,7 +110,7 @@ macro_rules! match_expression {
$ty::BooleanLiteral(_)
| $ty::NullLiteral(_)
| $ty::NumericLiteral(_)
| $ty::BigintLiteral(_)
| $ty::BigIntLiteral(_)
| $ty::RegExpLiteral(_)
| $ty::StringLiteral(_)
| $ty::TemplateLiteral(_)
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_ast/src/ast/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ macro_rules! inherit_variants {
/// Inherited from [`Expression`]
NumericLiteral(Box<'a, NumericLiteral<'a>>) = 2,
/// Inherited from [`Expression`]
BigintLiteral(Box<'a, BigIntLiteral<'a>>) = 3,
BigIntLiteral(Box<'a, BigIntLiteral<'a>>) = 3,
/// Inherited from [`Expression`]
RegExpLiteral(Box<'a, RegExpLiteral<'a>>) = 4,
/// Inherited from [`Expression`]
Expand Down Expand Up @@ -189,7 +189,7 @@ macro_rules! inherit_variants {
BooleanLiteral,
NullLiteral,
NumericLiteral,
BigintLiteral,
BigIntLiteral,
RegExpLiteral,
StringLiteral,
TemplateLiteral,
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_ast/src/ast/ts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub enum TSLiteral<'a> {
BooleanLiteral(Box<'a, BooleanLiteral>),
NullLiteral(Box<'a, NullLiteral>),
NumericLiteral(Box<'a, NumericLiteral<'a>>),
BigintLiteral(Box<'a, BigIntLiteral<'a>>),
BigIntLiteral(Box<'a, BigIntLiteral<'a>>),
RegExpLiteral(Box<'a, RegExpLiteral<'a>>),
StringLiteral(Box<'a, StringLiteral<'a>>),
TemplateLiteral(Box<'a, TemplateLiteral<'a>>),
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_ast/src/ast_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ impl<'a> AstBuilder<'a> {

#[inline]
pub fn literal_bigint_expression(self, literal: BigIntLiteral<'a>) -> Expression<'a> {
Expression::BigintLiteral(self.alloc(literal))
Expression::BigIntLiteral(self.alloc(literal))
}

#[inline]
Expand Down
8 changes: 4 additions & 4 deletions crates/oxc_ast/src/ast_impl/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl<'a> Expression<'a> {
Self::BooleanLiteral(_)
| Self::NullLiteral(_)
| Self::NumericLiteral(_)
| Self::BigintLiteral(_)
| Self::BigIntLiteral(_)
| Self::RegExpLiteral(_)
| Self::StringLiteral(_)
)
Expand Down Expand Up @@ -246,7 +246,7 @@ impl<'a> Expression<'a> {
Self::BooleanLiteral(lit) => Some(lit.value),
Self::NullLiteral(_) => Some(false),
Self::NumericLiteral(lit) => Some(lit.value != 0.0),
Self::BigintLiteral(lit) => Some(!lit.is_zero()),
Self::BigIntLiteral(lit) => Some(!lit.is_zero()),
Self::RegExpLiteral(_) => Some(true),
Self::StringLiteral(lit) => Some(!lit.value.is_empty()),
_ => None,
Expand All @@ -265,7 +265,7 @@ impl<'a> Expression<'a> {
Self::BooleanLiteral(_)
| Self::NullLiteral(_)
| Self::NumericLiteral(_)
| Self::BigintLiteral(_)
| Self::BigIntLiteral(_)
| Self::RegExpLiteral(_)
| Self::StringLiteral(_) => true,
Self::TemplateLiteral(lit) if lit.is_no_substitution_template() => true,
Expand Down Expand Up @@ -337,7 +337,7 @@ impl<'a> PropertyKey<'a> {
Self::StringLiteral(lit) => Some(lit.value.to_compact_str()),
Self::RegExpLiteral(lit) => Some(lit.regex.to_string().into()),
Self::NumericLiteral(lit) => Some(lit.value.to_string().into()),
Self::BigintLiteral(lit) => Some(lit.raw.to_compact_str()),
Self::BigIntLiteral(lit) => Some(lit.raw.to_compact_str()),
Self::NullLiteral(_) => Some("null".into()),
Self::TemplateLiteral(lit) => lit
.expressions
Expand Down
10 changes: 5 additions & 5 deletions crates/oxc_ast/src/ast_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ast_kinds! {
StringLiteral(&'a StringLiteral<'a>),
BooleanLiteral(&'a BooleanLiteral),
NullLiteral(&'a NullLiteral),
BigintLiteral(&'a BigIntLiteral<'a>),
BigIntLiteral(&'a BigIntLiteral<'a>),
RegExpLiteral(&'a RegExpLiteral<'a>),
TemplateLiteral(&'a TemplateLiteral<'a>),

Expand Down Expand Up @@ -271,7 +271,7 @@ impl<'a> AstKind<'a> {
| Self::StringLiteral(_)
| Self::BooleanLiteral(_)
| Self::NullLiteral(_)
| Self::BigintLiteral(_)
| Self::BigIntLiteral(_)
| Self::RegExpLiteral(_)
| Self::TemplateLiteral(_)
)
Expand Down Expand Up @@ -316,7 +316,7 @@ impl<'a> AstKind<'a> {
Expression::BooleanLiteral(e) => Self::BooleanLiteral(e),
Expression::NullLiteral(e) => Self::NullLiteral(e),
Expression::NumericLiteral(e) => Self::NumericLiteral(e),
Expression::BigintLiteral(e) => Self::BigintLiteral(e),
Expression::BigIntLiteral(e) => Self::BigIntLiteral(e),
Expression::RegExpLiteral(e) => Self::RegExpLiteral(e),
Expression::StringLiteral(e) => Self::StringLiteral(e),
Expression::TemplateLiteral(e) => Self::TemplateLiteral(e),
Expand Down Expand Up @@ -406,7 +406,7 @@ impl<'a> GetSpan for AstKind<'a> {
Self::StringLiteral(x) => x.span,
Self::BooleanLiteral(x) => x.span,
Self::NullLiteral(x) => x.span,
Self::BigintLiteral(x) => x.span,
Self::BigIntLiteral(x) => x.span,
Self::RegExpLiteral(x) => x.span,
Self::TemplateLiteral(x) => x.span,

Expand Down Expand Up @@ -601,7 +601,7 @@ impl<'a> AstKind<'a> {
Self::StringLiteral(s) => format!("StringLiteral({})", s.value).into(),
Self::BooleanLiteral(b) => format!("BooleanLiteral({})", b.value).into(),
Self::NullLiteral(_) => "NullLiteral".into(),
Self::BigintLiteral(b) => format!("BigintLiteral({})", b.raw).into(),
Self::BigIntLiteral(b) => format!("BigIntLiteral({})", b.raw).into(),
Self::RegExpLiteral(r) => format!("RegExpLiteral({})", r.regex).into(),
Self::TemplateLiteral(t) => format!(
"TemplateLiteral({})",
Expand Down
18 changes: 9 additions & 9 deletions crates/oxc_ast/src/generated/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<'a> GetSpan for Expression<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down Expand Up @@ -154,7 +154,7 @@ impl<'a> GetSpan for ArrayExpressionElement<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down Expand Up @@ -235,7 +235,7 @@ impl<'a> GetSpan for PropertyKey<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down Expand Up @@ -365,7 +365,7 @@ impl<'a> GetSpan for Argument<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down Expand Up @@ -764,7 +764,7 @@ impl<'a> GetSpan for ForStatementInit<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down Expand Up @@ -1199,7 +1199,7 @@ impl<'a> GetSpan for ExportDefaultDeclarationKind<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down Expand Up @@ -1282,7 +1282,7 @@ impl<'a> GetSpan for TSEnumMemberName<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down Expand Up @@ -1345,7 +1345,7 @@ impl<'a> GetSpan for TSLiteral<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down Expand Up @@ -2049,7 +2049,7 @@ impl<'a> GetSpan for JSXExpression<'a> {
Self::BooleanLiteral(it) => it.span(),
Self::NullLiteral(it) => it.span(),
Self::NumericLiteral(it) => it.span(),
Self::BigintLiteral(it) => it.span(),
Self::BigIntLiteral(it) => it.span(),
Self::RegExpLiteral(it) => it.span(),
Self::StringLiteral(it) => it.span(),
Self::TemplateLiteral(it) => it.span(),
Expand Down
6 changes: 3 additions & 3 deletions crates/oxc_ast/src/visit/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ pub mod walk {

pub fn walk_expression<'a, V: Visit<'a>>(visitor: &mut V, expr: &Expression<'a>) {
match expr {
Expression::BigintLiteral(lit) => visitor.visit_bigint_literal(lit),
Expression::BigIntLiteral(lit) => visitor.visit_bigint_literal(lit),
Expression::BooleanLiteral(lit) => visitor.visit_boolean_literal(lit),
Expression::NullLiteral(lit) => visitor.visit_null_literal(lit),
Expression::NumericLiteral(lit) => visitor.visit_number_literal(lit),
Expand Down Expand Up @@ -2316,7 +2316,7 @@ pub mod walk {
}

pub fn walk_bigint_literal<'a, V: Visit<'a>>(visitor: &mut V, lit: &BigIntLiteral<'a>) {
let kind = AstKind::BigintLiteral(visitor.alloc(lit));
let kind = AstKind::BigIntLiteral(visitor.alloc(lit));
visitor.enter_node(kind);
visitor.leave_node(kind);
}
Expand Down Expand Up @@ -3006,7 +3006,7 @@ pub mod walk {
let kind = AstKind::TSLiteralType(visitor.alloc(ty));
visitor.enter_node(kind);
match &ty.literal {
TSLiteral::BigintLiteral(lit) => visitor.visit_bigint_literal(lit),
TSLiteral::BigIntLiteral(lit) => visitor.visit_bigint_literal(lit),
TSLiteral::BooleanLiteral(lit) => visitor.visit_boolean_literal(lit),
TSLiteral::NullLiteral(lit) => visitor.visit_null_literal(lit),
TSLiteral::NumericLiteral(lit) => visitor.visit_number_literal(lit),
Expand Down
6 changes: 3 additions & 3 deletions crates/oxc_ast/src/visit/visit_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ pub mod walk_mut {

pub fn walk_expression_mut<'a, V: VisitMut<'a>>(visitor: &mut V, expr: &mut Expression<'a>) {
match expr {
Expression::BigintLiteral(lit) => visitor.visit_bigint_literal(lit),
Expression::BigIntLiteral(lit) => visitor.visit_bigint_literal(lit),
Expression::BooleanLiteral(lit) => visitor.visit_boolean_literal(lit),
Expression::NullLiteral(lit) => visitor.visit_null_literal(lit),
Expression::NumericLiteral(lit) => visitor.visit_number_literal(lit),
Expand Down Expand Up @@ -2402,7 +2402,7 @@ pub mod walk_mut {
visitor: &mut V,
_lit: &mut BigIntLiteral<'a>,
) {
let kind = AstType::BigintLiteral;
let kind = AstType::BigIntLiteral;
visitor.enter_node(kind);
visitor.leave_node(kind);
}
Expand Down Expand Up @@ -3078,7 +3078,7 @@ pub mod walk_mut {
let kind = AstType::TSLiteralType;
visitor.enter_node(kind);
match &mut ty.literal {
TSLiteral::BigintLiteral(lit) => visitor.visit_bigint_literal(lit),
TSLiteral::BigIntLiteral(lit) => visitor.visit_bigint_literal(lit),
TSLiteral::BooleanLiteral(lit) => visitor.visit_boolean_literal(lit),
TSLiteral::NullLiteral(lit) => visitor.visit_null_literal(lit),
TSLiteral::NumericLiteral(lit) => visitor.visit_number_literal(lit),
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_codegen/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ impl<'a, const MINIFY: bool> GenExpr<MINIFY> for Expression<'a> {
Self::BooleanLiteral(lit) => lit.gen(p, ctx),
Self::NullLiteral(lit) => lit.gen(p, ctx),
Self::NumericLiteral(lit) => lit.gen(p, ctx),
Self::BigintLiteral(lit) => lit.gen(p, ctx),
Self::BigIntLiteral(lit) => lit.gen(p, ctx),
Self::RegExpLiteral(lit) => lit.gen(p, ctx),
Self::StringLiteral(lit) => lit.gen(p, ctx),
Self::Identifier(ident) => ident.gen(p, ctx),
Expand Down Expand Up @@ -2958,7 +2958,7 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSLiteral<'a> {
Self::BooleanLiteral(decl) => decl.gen(p, ctx),
Self::NullLiteral(decl) => decl.gen(p, ctx),
Self::NumericLiteral(decl) => decl.gen(p, ctx),
Self::BigintLiteral(decl) => decl.gen(p, ctx),
Self::BigIntLiteral(decl) => decl.gen(p, ctx),
Self::RegExpLiteral(decl) => decl.gen(p, ctx),
Self::StringLiteral(decl) => decl.gen(p, ctx),
Self::TemplateLiteral(decl) => decl.gen(p, ctx),
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_isolated_declarations/src/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ impl<'a> IsolatedDeclarations<'a> {
match key {
PropertyKey::StringLiteral(_)
| PropertyKey::NumericLiteral(_)
| PropertyKey::BigintLiteral(_) => true,
| PropertyKey::BigIntLiteral(_) => true,
PropertyKey::TemplateLiteral(l) => l.expressions.is_empty(),
PropertyKey::UnaryExpression(expr) => {
expr.operator.is_arithmetic()
&& matches!(
expr.argument,
Expression::NumericLiteral(_) | Expression::BigintLiteral(_)
Expression::NumericLiteral(_) | Expression::BigIntLiteral(_)
)
}
_ => false,
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_isolated_declarations/src/inferrer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl<'a> IsolatedDeclarations<'a> {
Expression::BooleanLiteral(_) => Some(self.ast.ts_boolean_keyword(SPAN)),
Expression::NullLiteral(_) => Some(self.ast.ts_null_keyword(SPAN)),
Expression::NumericLiteral(_) => Some(self.ast.ts_number_keyword(SPAN)),
Expression::BigintLiteral(_) => Some(self.ast.ts_bigint_keyword(SPAN)),
Expression::BigIntLiteral(_) => Some(self.ast.ts_bigint_keyword(SPAN)),
Expression::StringLiteral(_) => Some(self.ast.ts_string_keyword(SPAN)),
Expression::TemplateLiteral(lit) => {
if lit.expressions.is_empty() {
Expand Down Expand Up @@ -139,7 +139,7 @@ impl<'a> IsolatedDeclarations<'a> {
pub fn is_need_to_infer_type_from_expression(expr: &Expression) -> bool {
match expr {
Expression::NumericLiteral(_)
| Expression::BigintLiteral(_)
| Expression::BigIntLiteral(_)
| Expression::StringLiteral(_) => false,
Expression::TemplateLiteral(lit) => !lit.expressions.is_empty(),
_ => true,
Expand Down
4 changes: 2 additions & 2 deletions crates/oxc_isolated_declarations/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ impl<'a> IsolatedDeclarations<'a> {
Expression::NumericLiteral(lit) => {
Some(self.ast.ts_literal_type(SPAN, TSLiteral::NumericLiteral(self.ast.copy(lit))))
}
Expression::BigintLiteral(lit) => {
Some(self.ast.ts_literal_type(SPAN, TSLiteral::BigintLiteral(self.ast.copy(lit))))
Expression::BigIntLiteral(lit) => {
Some(self.ast.ts_literal_type(SPAN, TSLiteral::BigIntLiteral(self.ast.copy(lit))))
}
Expression::StringLiteral(lit) => {
Some(self.ast.ts_literal_type(SPAN, TSLiteral::StringLiteral(self.ast.copy(lit))))
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/rules/eslint/eqeqeq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ fn are_literals_and_same_type(left: &Expression, right: &Expression) -> bool {
| (Expression::NullLiteral(_), Expression::NullLiteral(_))
| (Expression::StringLiteral(_), Expression::StringLiteral(_))
| (Expression::NumericLiteral(_), Expression::NumericLiteral(_))
| (Expression::BigintLiteral(_), Expression::BigintLiteral(_))
| (Expression::BigIntLiteral(_), Expression::BigIntLiteral(_))
| (Expression::RegExpLiteral(_), Expression::RegExpLiteral(_))
| (Expression::TemplateLiteral(_), Expression::TemplateLiteral(_))
)
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/rules/eslint/no_compare_neg_zero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn is_neg_zero(expr: &Expression) -> bool {
}
match &unary.argument {
Expression::NumericLiteral(number) => number.value == 0.0,
Expression::BigintLiteral(bigint) => bigint.is_zero(),
Expression::BigIntLiteral(bigint) => bigint.is_zero(),
_ => false,
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/rules/jest/prefer_to_be.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl PreferToBe {

matches!(
expr,
Expression::BigintLiteral(_)
Expression::BigIntLiteral(_)
| Expression::BooleanLiteral(_)
| Expression::NumericLiteral(_)
| Expression::NullLiteral(_)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fn get_kind_from_key(key: &PropertyKey) -> MethodKind {
PropertyKey::PrivateIdentifier(_) => MethodKind::Private,
PropertyKey::StringLiteral(_) => MethodKind::Normal,
PropertyKey::NumericLiteral(_)
| PropertyKey::BigintLiteral(_)
| PropertyKey::BigIntLiteral(_)
| PropertyKey::TemplateLiteral(_)
| PropertyKey::RegExpLiteral(_)
| PropertyKey::NullLiteral(_) => MethodKind::Quoted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn not_promise(expr: &Expression) -> bool {
| Expression::BooleanLiteral(_)
| Expression::NullLiteral(_)
| Expression::NumericLiteral(_)
| Expression::BigintLiteral(_)
| Expression::BigIntLiteral(_)
| Expression::RegExpLiteral(_)
| Expression::StringLiteral(_)
| Expression::TemplateLiteral(_)
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/rules/unicorn/number_literal_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl Rule for NumberLiteralCase {
fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {
let (raw_literal, raw_span) = match node.kind() {
AstKind::NumericLiteral(number) => (number.raw, number.span),
AstKind::BigintLiteral(number) => {
AstKind::BigIntLiteral(number) => {
let span = number.span;
(span.source_text(ctx.source_text()), span)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl Rule for NumericSeparatorsStyle {
);
}
}
AstKind::BigintLiteral(number) => {
AstKind::BigIntLiteral(number) => {
let raw = number.span.source_text(ctx.source_text());

if self.only_if_contains_separator && !raw.contains('_') {
Expand Down
Loading

0 comments on commit 66c4d42

Please sign in to comment.