pub struct ParseParams {
    pub specifier: String,
    pub text_info: SourceTextInfo,
    pub media_type: MediaType,
    pub capture_tokens: bool,
    pub scope_analysis: bool,
    pub maybe_syntax: Option<Syntax>,
}
Expand description

Parameters for parsing.

Fields

specifier: String

Specifier of the source text.

text_info: SourceTextInfo

Source text stored in a SourceTextInfo.

media_type: MediaType

Media type of the source text.

capture_tokens: bool

Whether to capture tokens or not.

scope_analysis: bool

Whether to apply swc’s scope analysis.

maybe_syntax: Option<Syntax>

Syntax to use when parsing.

deno_ast will get a default Syntax to use based on the media type, but you may use this to provide a custom Syntax.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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