Struct deno_ast::ParsedSource [−][src]
pub struct ParsedSource { /* fields omitted */ }
Expand description
A parsed source containing an AST, comments, and possibly tokens.
Implementations
pub fn new(
specifier: String,
media_type: MediaType,
source: SourceTextInfo,
comments: MultiThreadedComments,
program: Arc<Program>,
tokens: Option<Arc<Vec<TokenAndSpan>>>
) -> Self
Gets the media type of the module.
Gets the text content of the module.
Gets the parsed program as a reference.
Gets the parsed module.
This will panic if the source is not a module.
Gets the parsed script.
This will panic if the source is not a script.
Gets the comments found in the source file.
Get the source’s leading comments, where triple slash directives might be located.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ParsedSource
impl Send for ParsedSource
impl Sync for ParsedSource
impl Unpin for ParsedSource
impl UnwindSafe for ParsedSource
Blanket Implementations
Mutably borrows from an owned value. Read more