Struct oq3_syntax::ParseOrErrors
source · pub struct ParseOrErrors<T> { /* private fields */ }
Expand description
Same as ParseGreenNode
is wrapped in Option
.
The Option
is None
if lexer errors were recorded, in which case no
parsing was done. In the same case, all errors will be lexer errors.
If there are no lexer errors, the parsing was done, and there is a GreenNode
.
In this case any errors are parser errors.
Implementations§
source§impl<T> ParseOrErrors<T>
impl<T> ParseOrErrors<T>
pub fn syntax_node(&self) -> SyntaxNode
pub fn errors(&self) -> &[SyntaxError]
pub fn have_parse(&self) -> bool
Trait Implementations§
source§impl<T> Clone for ParseOrErrors<T>
impl<T> Clone for ParseOrErrors<T>
source§fn clone(&self) -> ParseOrErrors<T>
fn clone(&self) -> ParseOrErrors<T>
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<T: Debug> Debug for ParseOrErrors<T>
impl<T: Debug> Debug for ParseOrErrors<T>
source§impl<T: PartialEq> PartialEq for ParseOrErrors<T>
impl<T: PartialEq> PartialEq for ParseOrErrors<T>
source§fn eq(&self, other: &ParseOrErrors<T>) -> bool
fn eq(&self, other: &ParseOrErrors<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T: Eq> Eq for ParseOrErrors<T>
impl<T> StructuralPartialEq for ParseOrErrors<T>
Auto Trait Implementations§
impl<T> Freeze for ParseOrErrors<T>
impl<T> RefUnwindSafe for ParseOrErrors<T>
impl<T> Send for ParseOrErrors<T>
impl<T> Sync for ParseOrErrors<T>
impl<T> Unpin for ParseOrErrors<T>
impl<T> UnwindSafe for ParseOrErrors<T>
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<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