pub struct DocParser<'a> {
pub ast_parser: &'a dyn SourceParser,
pub graph: ModuleGraph,
pub private: bool,
}
Fields
ast_parser: &'a dyn SourceParser
graph: ModuleGraph
private: bool
Implementations
pub fn parse_module(
&self,
specifier: &ModuleSpecifier,
media_type: MediaType,
source_code: Arc<String>
) -> Result<ModuleDoc, DocError>
pub fn parse_module(
&self,
specifier: &ModuleSpecifier,
media_type: MediaType,
source_code: Arc<String>
) -> Result<ModuleDoc, DocError>
Parses a module into a list of exported items, as well as a list of reexported items which need to be fetched from other modules.
Fetches file_name
and parses it.
pub fn parse_source(
&self,
specifier: &ModuleSpecifier,
media_type: MediaType,
source_code: Arc<String>
) -> Result<Vec<DocNode>, DocError>
pub fn parse_source(
&self,
specifier: &ModuleSpecifier,
media_type: MediaType,
source_code: Arc<String>
) -> Result<Vec<DocNode>, DocError>
Parses a module and returns a list of exported items (no reexports).
pub fn parse_with_reexports(
&self,
specifier: &ModuleSpecifier
) -> Result<Vec<DocNode>, DocError>
pub fn parse_with_reexports(
&self,
specifier: &ModuleSpecifier
) -> Result<Vec<DocNode>, DocError>
Fetches file_name
, parses it, and resolves its reexports.
pub fn get_doc_nodes_for_module_exports(
&self,
parsed_source: &ParsedSource,
module_decl: &ModuleDecl
) -> Vec<DocNode>ⓘ
pub fn get_doc_node_for_decl(
&self,
parsed_source: &ParsedSource,
decl: &Decl
) -> Option<DocNode>
pub fn get_reexports_for_module_body(
&self,
module_body: &[ModuleItem]
) -> Vec<Reexport>ⓘ
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DocParser<'a>
impl<'a> !UnwindSafe for DocParser<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more