Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(oxc): add submodule documentation #5984

Merged
merged 1 commit into from
Sep 23, 2024
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
38 changes: 38 additions & 0 deletions crates/oxc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ mod compiler;
pub use compiler::{Compiler, CompilerInterface};

pub mod allocator {
//! Memory arena allocator used by all other submodules.
//!
//! See the [`oxc_allocator` module-level documentation](oxc_allocator) for more information.
#[doc(inline)]
pub use oxc_allocator::*;
}
Expand All @@ -19,16 +22,25 @@ pub mod ast {
}

pub mod diagnostics {
//! Error data types and utilities for handling/reporting them.
//!
//! See the [`oxc_diagnostics` module-level documentation](oxc_diagnostics) for more information.
#[doc(inline)]
pub use oxc_diagnostics::*;
}

pub mod index {
//! A Vec with newtype indexing.
//!
//! See the [`oxc_index` module-level documentation](oxc_index) for more information.
#[doc(inline)]
pub use oxc_index::*;
}

pub mod parser {
//! JavaScript/TypeScript parser.
//!
//! See the [`oxc_parser` module-level documentation](oxc_parser) for more information.
#[doc(inline)]
pub use oxc_parser::*;
}
Expand All @@ -39,29 +51,45 @@ pub mod regular_expression {
}

pub mod span {
//! Source text Span and string types.
//!
//! See the [`oxc_span` module-level documentation](oxc_span) for more information.
#[doc(inline)]
pub use oxc_span::*;
}

pub mod syntax {
//! Common code for JavaScript Syntax
//!
//! See the [`oxc_syntax` module-level documentation](oxc_syntax) for more information.
#[doc(inline)]
pub use oxc_syntax::*;
}

#[cfg(feature = "semantic")]
pub mod semantic {
//! Semantic analysis of a JavaScript/TypeScript program.
//!
//! See the [`oxc_semantic` module-level documentation](oxc_semantic) for more information.
#[doc(inline)]
pub use oxc_semantic::*;
}

#[cfg(feature = "transformer")]
pub mod transformer {
//! Transformer/Transpiler
//!
//! See the [`oxc_transformer` module-level documentation](oxc_transformer) for more
//! information.
#[doc(inline)]
pub use oxc_transformer::*;
}

#[cfg(feature = "minifier")]
pub mod minifier {
//! Source code minifier.
//!
//! See the [`oxc_minifier` module-level documentation](oxc_minifier) for more information.
#[doc(inline)]
pub use oxc_minifier::*;
}
Expand All @@ -74,18 +102,28 @@ pub mod mangler {

#[cfg(feature = "codegen")]
pub mod codegen {
//! AST code printer
//!
//! See the [`oxc_codegen` module-level documentation](oxc_codegen) for more information.
#[doc(inline)]
pub use oxc_codegen::*;
}

#[cfg(feature = "isolated_declarations")]
pub mod isolated_declarations {
//! `.d.ts` emit for Isolated Declarations.
//!
//! See the [`oxc_isolated_declarations` module-level documentation](oxc_isolated_declarations)
//! for more information.
#[doc(inline)]
pub use oxc_isolated_declarations::*;
}

#[cfg(feature = "sourcemap")]
pub mod sourcemap {
//! Source Maps
//!
//! See the [`oxc_sourcemap` module-level documentation](oxc_sourcemap) for more information.
#[doc(inline)]
pub use oxc_sourcemap::*;
}
Expand Down