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: boolParsing of JSX (includes some additions)
type_annotations: boolallow type annotations
type_definition_module: booljust definition file
special_jsx_attributes: boolAllow custom characters in JSX attributes
decorators: boolParses decorators on items
comments: CommentsSkip all comments from the AST
is_expressions: bool§custom_function_headers: boolAllows functions to be prefixed with ‘server’
buffer_size: usizeTODO temp for seeing how channel performs
stack_size: Option<usize>Has no effect on WASM. Increase for deeply nested AST structures
record_keyword_positions: boolUseful for LSP information
interpolation_points: boolFor the generator
destructuring_type_annotation: boolExtra
extra_operators: boolExtra
retain_blank_lines: boolFor formatting
partial_syntax: boolFor LSP
top_level_html: boolJSX 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