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
1 change: 1 addition & 0 deletions .github/.generated_ast_watch_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ src:
- 'crates/oxc_ast/src/generated/assert_layouts.rs'
- 'crates/oxc_ast/src/generated/ast_kind.rs'
- 'crates/oxc_ast/src/generated/ast_builder.rs'
- 'crates/oxc_ast/src/generated/get_id.rs'
- 'crates/oxc_ast/src/generated/visit.rs'
- 'crates/oxc_ast/src/generated/visit_mut.rs'
- 'npm/oxc-types/types.d.ts'
Expand Down
17 changes: 1 addition & 16 deletions crates/oxc_ast/src/ast_impl/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ use std::{borrow::Cow, fmt};

use oxc_allocator::{Address, Box, FromIn, GetAddress, Vec};
use oxc_span::{Atom, GetSpan, Span};
use oxc_syntax::{
operator::UnaryOperator, reference::ReferenceId, scope::ScopeFlags, symbol::SymbolId,
};
use oxc_syntax::{operator::UnaryOperator, scope::ScopeFlags, symbol::SymbolId};

use crate::ast::*;

Expand Down Expand Up @@ -293,19 +291,6 @@ impl<'a> fmt::Display for IdentifierName<'a> {
}
}

impl<'a> IdentifierReference<'a> {
/// Get `ReferenceId` of `IdentifierReference`.
///
/// Only use this method on a post-semantic AST where `ReferenceId`s are always defined.
///
/// # Panics
/// Panics if `reference_id` is `None`.
#[inline]
pub fn reference_id(&self) -> ReferenceId {
self.reference_id.get().unwrap()
}
}

impl<'a> fmt::Display for IdentifierReference<'a> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.name.fmt(f)
Expand Down
Loading