pub enum Kind {
Show 36 variants
Term,
String,
AltIdentifier,
Integer,
Identifier,
ChildOrSelfOf,
DescendantOrSelfOf,
ChildOf,
LessOrEqual,
LessThan,
ParentOrSelfOf,
AncestorOrSelfOf,
ParentOf,
GreaterOrEqual,
GreaterThan,
Top,
Bottom,
NotEqual,
Equal,
LeftParen,
RightParen,
DoubleLeftBrace,
DoubleRightBrace,
LeftBrace,
RightBrace,
LeftBracket,
RightBracket,
Colon,
Comma,
Caret,
To,
Period,
Asterisk,
Hash,
Plus,
Dash,
}Expand description
A token kind.
Variants§
Term
|term| (eclconceptreference, altidentifier).
String
A quoted string (typedsearchterm, timevalue, the quoted
altidentifier, and the string concrete value).
AltIdentifier
scheme#code (altidentifier without quotes).
Integer
A run of digits (sctid, integervalue, nonnegativeintegervalue).
Identifier
A word: the keywords, refsetfieldname, languagecode,
dialectalias, and the reverse flag R.
ChildOrSelfOf
<<!
DescendantOrSelfOf
<<
ChildOf
<!
LessOrEqual
<=
LessThan
<
ParentOrSelfOf
>>!
AncestorOrSelfOf
>>
ParentOf
>!
GreaterOrEqual
>=
GreaterThan
>
Top
!!>
Bottom
!!<
NotEqual
!=
Equal
=
LeftParen
(
RightParen
)
DoubleLeftBrace
{{
DoubleRightBrace
}}
LeftBrace
{
RightBrace
}
LeftBracket
[
RightBracket
]
Colon
:
Comma
,
Caret
^
To
..
Period
.
Asterisk
*
Hash
#
Plus
+
Dash
-
Implementations§
Trait Implementations§
Source§impl ContainsToken<&Token<'_>> for Kind
impl ContainsToken<&Token<'_>> for Kind
Source§fn contains_token(&self, token: &Token<'_>) -> bool
fn contains_token(&self, token: &Token<'_>) -> bool
Returns true if self contains the token
impl Copy for Kind
impl Eq for Kind
Source§impl<'s> Logos<'s> for Kind
impl<'s> Logos<'s> for Kind
Source§type Error = ()
type Error = ()
Error type returned by the lexer. This can be set using
#[logos(error = MyError)]. Defaults to () if not set.Source§type Extras = ()
type Extras = ()
Associated type
Extras for the particular lexer. This can be set using
#[logos(extras = MyExtras)] and accessed inside callbacks.Source§type Source = str
type Source = str
Source type this token can be lexed from. This will default to
str,
unless one of the defined patterns explicitly uses non-unicode byte values
or byte slices, in which case that implementation will use [u8].Source§fn lex(
lex: &mut Lexer<'s, Self>,
) -> Option<Result<Self, <Self as Logos<'s>>::Error>>
fn lex( lex: &mut Lexer<'s, Self>, ) -> Option<Result<Self, <Self as Logos<'s>>::Error>>
The heart of Logos. Called by the
Lexer. The implementation for this function
is generated by the logos-derive crate.impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnsafeUnpin for Kind
impl UnwindSafe for Kind
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