Enum biome_js_syntax::TriviaPieceKind
source · pub enum TriviaPieceKind {
Newline,
Whitespace,
SingleLineComment,
MultiLineComment,
Skipped,
}
Variants§
Newline
A line break (\n
, \r
, \r\n
, …)
Whitespace
Any whitespace character
SingleLineComment
Comment that does not contain any line breaks
MultiLineComment
Comment that contains at least one line break
Skipped
Token that the parser skipped for some reason.
Implementations§
source§impl TriviaPieceKind
impl TriviaPieceKind
pub const fn is_newline(&self) -> bool
pub const fn is_whitespace(&self) -> bool
pub const fn is_comment(&self) -> bool
pub const fn is_single_line_comment(&self) -> bool
pub const fn is_multiline_comment(&self) -> bool
pub const fn is_skipped(&self) -> bool
Trait Implementations§
source§impl Clone for TriviaPieceKind
impl Clone for TriviaPieceKind
source§fn clone(&self) -> TriviaPieceKind
fn clone(&self) -> TriviaPieceKind
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 TriviaPieceKind
impl Debug for TriviaPieceKind
source§impl Hash for TriviaPieceKind
impl Hash for TriviaPieceKind
source§impl PartialEq for TriviaPieceKind
impl PartialEq for TriviaPieceKind
source§fn eq(&self, other: &TriviaPieceKind) -> bool
fn eq(&self, other: &TriviaPieceKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<JsSyntaxKind> for TriviaPieceKind
impl TryFrom<JsSyntaxKind> for TriviaPieceKind
impl Copy for TriviaPieceKind
impl Eq for TriviaPieceKind
impl StructuralPartialEq for TriviaPieceKind
Auto Trait Implementations§
impl Freeze for TriviaPieceKind
impl RefUnwindSafe for TriviaPieceKind
impl Send for TriviaPieceKind
impl Sync for TriviaPieceKind
impl Unpin for TriviaPieceKind
impl UnwindSafe for TriviaPieceKind
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.