pub struct Syntax {
pub file_kind: FileKind,
pub top_level_await: bool,
pub global_return: bool,
pub class_fields: bool,
pub decorators: bool,
}
Expand description
A structure describing the syntax features the parser will accept. The default is an ECMAScript 2021 Script without any proposals.
Fields§
§file_kind: FileKind
§top_level_await: bool
§global_return: bool
§class_fields: bool
§decorators: bool
Implementations§
Source§impl Syntax
impl Syntax
pub fn new(file_kind: FileKind) -> Self
pub fn top_level_await(self) -> Self
pub fn global_return(self) -> Self
pub fn class_fields(self) -> Self
pub fn decorators(self) -> Self
pub fn script(self) -> Self
pub fn module(self) -> Self
pub fn typescript(self) -> Self
Trait Implementations§
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 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