Skip to content
Merged
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
8 changes: 8 additions & 0 deletions crates/oxc_semantic/src/node.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use oxc_ast::AstKind;
use oxc_cfg::BasicBlockId;
use oxc_index::IndexVec;
use oxc_span::GetSpan;
pub use oxc_syntax::node::{AstNodeId, NodeFlags};

use crate::scope::ScopeId;
Expand Down Expand Up @@ -64,6 +65,13 @@ impl<'a> AstNode<'a> {
}
}

impl GetSpan for AstNode<'_> {
#[inline]
fn span(&self) -> oxc_span::Span {
self.kind.span()
}
}

/// Untyped AST nodes flattened into an vec
#[derive(Debug, Default)]
pub struct AstNodes<'a> {
Expand Down