Enum biome_js_parser::JsLexContext
source · pub enum JsLexContext {
Regular,
TemplateElement {
tagged: bool,
},
JsxChild,
JsxAttributeValue,
}Expand description
Context in which the lexer should lex the next token
Variants§
Regular
Default context for if the lexer isn’t in any specific other context
TemplateElement
For lexing the elements of a JS template literal or TS template type. Doesn’t skip whitespace trivia.
JsxChild
Lexes a token in a JSX children context. Returns one of
- Whitespace trivia
- JsxText
<end of the current element, or start of a new element- expression start:
{ - EOF
JsxAttributeValue
Lexes a JSX Attribute value. Calls into normal lex token if positioned at anything
that isn’t ' or ".
Trait Implementations§
source§impl Clone for JsLexContext
impl Clone for JsLexContext
source§fn clone(&self) -> JsLexContext
fn clone(&self) -> JsLexContext
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 Debug for JsLexContext
impl Debug for JsLexContext
source§impl Default for JsLexContext
impl Default for JsLexContext
source§fn default() -> JsLexContext
fn default() -> JsLexContext
Returns the “default value” for a type. Read more
source§impl LexContext for JsLexContext
impl LexContext for JsLexContext
source§fn is_regular(&self) -> bool
fn is_regular(&self) -> bool
Returns true if this is JsLexContext::Regular
source§impl PartialEq for JsLexContext
impl PartialEq for JsLexContext
source§fn eq(&self, other: &JsLexContext) -> bool
fn eq(&self, other: &JsLexContext) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for JsLexContext
impl Eq for JsLexContext
impl StructuralPartialEq for JsLexContext
Auto Trait Implementations§
impl RefUnwindSafe for JsLexContext
impl Send for JsLexContext
impl Sync for JsLexContext
impl Unpin for JsLexContext
impl UnwindSafe for JsLexContext
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.