Enum biome_js_parser::JsSyntaxFeature
source · pub enum JsSyntaxFeature {
SloppyMode,
StrictMode,
TypeScript,
Jsx,
}Variants§
Trait Implementations§
source§impl SyntaxFeature for JsSyntaxFeature
impl SyntaxFeature for JsSyntaxFeature
type Parser<'source> = JsParser<'source>
source§fn is_supported(&self, p: &JsParser<'_>) -> bool
fn is_supported(&self, p: &JsParser<'_>) -> bool
Returns
true if the current parsing context supports this syntax feature.source§fn is_unsupported(&self, p: &Self::Parser<'_>) -> bool
fn is_unsupported(&self, p: &Self::Parser<'_>) -> bool
Returns
true if the current parsing context doesn’t support this syntax feature.source§fn exclusive_syntax<'source, S, E, D>(
&self,
p: &mut Self::Parser<'source>,
syntax: S,
error_builder: E
) -> ParsedSyntaxwhere
S: Into<ParsedSyntax>,
E: FnOnce(&Self::Parser<'source>, &CompletedMarker) -> D,
D: ToDiagnostic<Self::Parser<'source>>,
fn exclusive_syntax<'source, S, E, D>(
&self,
p: &mut Self::Parser<'source>,
syntax: S,
error_builder: E
) -> ParsedSyntaxwhere
S: Into<ParsedSyntax>,
E: FnOnce(&Self::Parser<'source>, &CompletedMarker) -> D,
D: ToDiagnostic<Self::Parser<'source>>,
Adds a diagnostic and changes the kind of the node to SyntaxKind::to_bogus if this feature isn’t
supported. Read more
source§fn parse_exclusive_syntax<'source, P, E>(
&self,
p: &mut Self::Parser<'source>,
parse: P,
error_builder: E
) -> ParsedSyntaxwhere
P: FnOnce(&mut Self::Parser<'source>) -> ParsedSyntax,
E: FnOnce(&Self::Parser<'source>, &CompletedMarker) -> ParseDiagnostic,
fn parse_exclusive_syntax<'source, P, E>(
&self,
p: &mut Self::Parser<'source>,
parse: P,
error_builder: E
) -> ParsedSyntaxwhere
P: FnOnce(&mut Self::Parser<'source>) -> ParsedSyntax,
E: FnOnce(&Self::Parser<'source>, &CompletedMarker) -> ParseDiagnostic,
Parses a syntax and adds a diagnostic and changes the kind of the node to SyntaxKind::to_bogus if this feature isn’t
supported. Read more
source§fn excluding_syntax<'source, S, E>(
&self,
p: &mut Self::Parser<'source>,
syntax: S,
error_builder: E
) -> ParsedSyntaxwhere
S: Into<ParsedSyntax>,
E: FnOnce(&Self::Parser<'source>, &CompletedMarker) -> ParseDiagnostic,
fn excluding_syntax<'source, S, E>(
&self,
p: &mut Self::Parser<'source>,
syntax: S,
error_builder: E
) -> ParsedSyntaxwhere
S: Into<ParsedSyntax>,
E: FnOnce(&Self::Parser<'source>, &CompletedMarker) -> ParseDiagnostic,
Adds a diagnostic and changes the kind of the node to SyntaxKind::to_bogus if this feature is
supported. Read more
Auto Trait Implementations§
impl RefUnwindSafe for JsSyntaxFeature
impl Send for JsSyntaxFeature
impl Sync for JsSyntaxFeature
impl Unpin for JsSyntaxFeature
impl UnwindSafe for JsSyntaxFeature
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