pub enum Syntax {
Es(EsSyntax),
Typescript(TsSyntax),
}Expand description
Parser syntax mode.
Variants§
Es(EsSyntax)
ECMAScript mode.
Typescript(TsSyntax)
Available on crate feature
typescript only.TypeScript mode.
Implementations§
Source§impl Syntax
impl Syntax
Sourcepub fn typescript(self) -> bool
pub fn typescript(self) -> bool
Returns true if TypeScript should be parsed.
Sourcepub fn decorators(self) -> bool
pub fn decorators(self) -> bool
Returns true if decorators are enabled.
Sourcepub fn explicit_resource_management(self) -> bool
pub fn explicit_resource_management(self) -> bool
Returns true if resource declarations are enabled.
Sourcepub fn early_errors(self) -> bool
pub fn early_errors(self) -> bool
Returns true when early errors should be checked.
Sourcepub fn allow_super_outside_method(self) -> bool
pub fn allow_super_outside_method(self) -> bool
Returns true if super outside method is allowed.
Sourcepub fn allow_return_outside_function(self) -> bool
pub fn allow_return_outside_function(self) -> bool
Returns true if return outside function is allowed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Syntax
impl<'de> Deserialize<'de> for Syntax
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 Syntax
impl Eq for Syntax
impl StructuralPartialEq for Syntax
Auto Trait Implementations§
impl Freeze for Syntax
impl RefUnwindSafe for Syntax
impl Send for Syntax
impl Sync for Syntax
impl Unpin for Syntax
impl UnsafeUnpin for Syntax
impl UnwindSafe for Syntax
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more