mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
Part of #2295
This PR splits the `Atom` type into `Atom<'a>` and `CompactString`.
All the AST node strings now use `Atom<'a>` instead of `Atom` to signify
it belongs to the arena.
It is now up to the user to select which form of the string to use.
This PR essentially removes the really unsafe code
93742f89e9/crates/oxc_span/src/atom.rs (L98-L107)
which can lead to

14 lines
349 B
Rust
14 lines
349 B
Rust
//! Source positions and related helper functions.
|
|
//!
|
|
//! <https://doc.rust-lang.org/beta/nightly-rustc/rustc_span>
|
|
|
|
mod atom;
|
|
mod source_type;
|
|
mod span;
|
|
|
|
pub use crate::{
|
|
atom::Atom,
|
|
source_type::{Language, LanguageVariant, ModuleKind, SourceType, VALID_EXTENSIONS},
|
|
span::{GetSpan, Span, SPAN},
|
|
};
|
|
pub use compact_str::CompactString;
|