pub enum SyntaxNodeType {
Comment,
VariableToken,
StringToken,
WordToken,
OpenParen,
CloseParen,
Whitespace,
LeftoverText,
ExpressionGroup,
ErrorGroup,
}Expand description
The meaning of a parsed syntactic element, generated from a substring in the input text
Variants§
Comment
Comment line. All text between a non-escaped ‘;’ and a newline
VariableToken
Variable. A symbol immediately preceded by a ‘$’ sigil
StringToken
String Literal. All text between non-escaped ‘“’ (double quote) characters
WordToken
Word Token. Any other whitespace-delimited token that isn’t a Variable, or StringToken
OpenParen
Open Parenthesis. A non-escaped ‘(’ character indicating the beginning of an expression
CloseParen
Close Parenthesis. A non-escaped ‘)’ character indicating the end of an expression
Whitespace
Whitespace. One or more whitespace chars
LeftoverText
Text that remains unparsed after a parse error has occurred
ExpressionGroup
A Group of SyntaxNodes between an OpenParen and a matching CloseParen
ErrorGroup
Syntax Nodes that cannot be combined into a coherent atom due to a parse error, even if some of the individual nodes could represent valid atoms
Implementations§
Trait Implementations§
Source§impl Clone for SyntaxNodeType
impl Clone for SyntaxNodeType
Source§fn clone(&self) -> SyntaxNodeType
fn clone(&self) -> SyntaxNodeType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SyntaxNodeType
impl Debug for SyntaxNodeType
impl Copy for SyntaxNodeType
Auto Trait Implementations§
impl Freeze for SyntaxNodeType
impl RefUnwindSafe for SyntaxNodeType
impl Send for SyntaxNodeType
impl Sync for SyntaxNodeType
impl Unpin for SyntaxNodeType
impl UnwindSafe for SyntaxNodeType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request