pub struct ParseOptions {Show 17 fields
pub jsx: bool,
pub type_annotations: bool,
pub type_definition_module: bool,
pub special_jsx_attributes: bool,
pub decorators: bool,
pub comments: Comments,
pub is_expressions: bool,
pub custom_function_headers: bool,
pub buffer_size: usize,
pub stack_size: Option<usize>,
pub record_keyword_positions: bool,
pub interpolation_points: bool,
pub destructuring_type_annotation: bool,
pub extra_operators: bool,
pub retain_blank_lines: bool,
pub partial_syntax: bool,
pub top_level_html: bool,
}
Expand description
Options to customize parsing
Fields§
§jsx: bool
Parsing of JSX (includes some additions)
type_annotations: bool
allow type annotations
type_definition_module: bool
just definition file
special_jsx_attributes: bool
Allow custom characters in JSX attributes
decorators: bool
Parses decorators on items
comments: Comments
Skip all comments from the AST
is_expressions: bool
§custom_function_headers: bool
Allows functions to be prefixed with ‘server’
buffer_size: usize
TODO temp for seeing how channel performs
stack_size: Option<usize>
Has no effect on WASM. Increase for deeply nested AST structures
record_keyword_positions: bool
Useful for LSP information
interpolation_points: bool
For the generator
destructuring_type_annotation: bool
Extra
extra_operators: bool
Extra
retain_blank_lines: bool
For formatting
partial_syntax: bool
For LSP
top_level_html: bool
JSX with modifications equiv
Implementations§
Source§impl ParseOptions
impl ParseOptions
pub fn all_features() -> Self
Trait Implementations§
Source§impl Clone for ParseOptions
impl Clone for ParseOptions
Source§fn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for ParseOptions
impl Default for ParseOptions
Source§impl<'de> Deserialize<'de> for ParseOptionswhere
ParseOptions: Default,
impl<'de> Deserialize<'de> for ParseOptionswhere
ParseOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for ParseOptions
Auto Trait Implementations§
impl Freeze for ParseOptions
impl RefUnwindSafe for ParseOptions
impl Send for ParseOptions
impl Sync for ParseOptions
impl Unpin for ParseOptions
impl UnwindSafe for ParseOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more