mirror of
https://github.com/swc-project/swc.git
synced 2024-12-29 16:42:28 +03:00
chore: Improve docs (#2301)
This commit is contained in:
parent
5e1003ec4c
commit
83d88ce388
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2429,7 +2429,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_common"
|
||||
version = "0.12.1"
|
||||
version = "0.12.2"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"arbitrary",
|
||||
|
@ -6,7 +6,7 @@ edition = "2018"
|
||||
license = "Apache-2.0/MIT"
|
||||
name = "swc_common"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
version = "0.12.1"
|
||||
version = "0.12.2"
|
||||
|
||||
[features]
|
||||
concurrent = ["parking_lot"]
|
||||
|
@ -110,6 +110,18 @@ pub(super) struct SourceMapFiles {
|
||||
/// - Each ast node only stores pointer to actual data ([BytePos]).
|
||||
/// - The pointers ([BytePos]) can be converted to file name, line and column
|
||||
/// using this struct.
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// This struct should be shared. `swc_common` uses [crate::sync::Lrc], which is
|
||||
/// [std::rc::Rc] or [std::sync::Arc], depending on the compile option, for this
|
||||
/// purpose.
|
||||
///
|
||||
/// ## Note for bundler authors
|
||||
///
|
||||
/// If you are bundling modules, you should share this struct while parsing
|
||||
/// modules. Otherwise, you have to implement a code generator which accepts
|
||||
/// multiple [SourceMap].
|
||||
pub struct SourceMap {
|
||||
pub(super) files: Lock<SourceMapFiles>,
|
||||
start_pos: AtomicUsize,
|
||||
|
Loading…
Reference in New Issue
Block a user