pub enum Token {
Show 104 variants
Stream,
Event,
Type,
Let,
Var,
Const,
Fn,
Config,
If,
Else,
Elif,
Then,
Match,
For,
While,
Break,
Continue,
Return,
From,
Where,
Select,
Join,
Merge,
Window,
Aggregate,
PartitionBy,
OrderBy,
Limit,
Distinct,
Emit,
To,
On,
All,
Within,
Pattern,
True,
False,
Null,
And,
Or,
Xor,
Not,
In,
Is,
As,
Extends,
Import,
Export,
IntType,
FloatType,
BoolType,
StrType,
TimestampType,
DurationType,
StreamType,
Plus,
Minus,
Star,
Slash,
Percent,
DoubleStar,
EqEq,
NotEq,
Lt,
Le,
Gt,
Ge,
Amp,
Pipe,
Caret,
Tilde,
Shl,
Shr,
Eq,
PlusEq,
MinusEq,
StarEq,
SlashEq,
PercentEq,
Dot,
QuestionDot,
QuestionQuestion,
FatArrow,
Arrow,
DotDot,
DotDotEq,
Dollar,
LParen,
RParen,
LBracket,
RBracket,
LBrace,
RBrace,
Comma,
Colon,
Question,
At,
Integer(i64),
Float(f64),
String(String),
Duration(String),
Timestamp(String),
Ident(String),
Eof,
}Expand description
Token type for VPL
Variants§
Stream
stream keyword.
Event
event keyword.
Type
type keyword.
Let
let keyword.
Var
var keyword.
Const
const keyword.
Fn
fn keyword.
Config
config keyword.
If
if keyword.
Else
else keyword.
Elif
elif keyword.
Then
then keyword.
Match
match keyword.
For
for keyword.
While
while keyword.
Break
break keyword.
Continue
continue keyword.
Return
return keyword.
From
from keyword.
Where
where keyword.
Select
select keyword.
Join
join keyword.
Merge
merge keyword.
Window
window keyword.
Aggregate
aggregate keyword.
PartitionBy
partition_by keyword.
OrderBy
order_by keyword.
Limit
limit keyword.
Distinct
distinct keyword.
Emit
emit keyword.
To
to keyword.
On
on keyword.
All
all keyword.
Within
within keyword.
Pattern
pattern keyword.
True
Boolean literal true.
False
Boolean literal false.
Null
Null literal.
And
Logical and operator.
Or
Logical or operator.
Xor
Logical xor operator.
Not
Logical not operator.
In
in keyword (membership test / for loops).
Is
is keyword (type check).
As
as keyword (alias / cast).
Extends
extends keyword (event inheritance).
Import
import keyword.
Export
export keyword.
IntType
int type keyword.
FloatType
float type keyword.
BoolType
bool type keyword.
StrType
str type keyword.
TimestampType
timestamp type keyword.
DurationType
duration type keyword.
StreamType
Stream type keyword.
Plus
+ operator.
Minus
- operator.
Star
* operator.
Slash
/ operator.
Percent
% operator (modulo).
DoubleStar
** operator (exponentiation).
EqEq
== equality comparison.
NotEq
!= inequality comparison.
Lt
< less-than comparison.
Le
<= less-than-or-equal comparison.
Gt
> greater-than comparison.
Ge
>= greater-than-or-equal comparison.
Amp
& bitwise AND.
Pipe
| bitwise OR.
Caret
^ bitwise XOR.
Tilde
~ bitwise NOT.
Shl
<< left shift.
Shr
>> right shift.
Eq
= assignment.
PlusEq
+= add-assign.
MinusEq
-= subtract-assign.
StarEq
*= multiply-assign.
SlashEq
/= divide-assign.
PercentEq
%= modulo-assign.
Dot
. member access.
QuestionDot
?. optional chaining.
QuestionQuestion
?? null coalescing.
FatArrow
=> fat arrow (lambdas / match arms).
Arrow
-> thin arrow (return type annotation).
DotDot
.. exclusive range.
DotDotEq
..= inclusive range.
Dollar
$ dollar sign (special variable prefix).
LParen
( left parenthesis.
RParen
) right parenthesis.
LBracket
[ left bracket.
RBracket
] right bracket.
LBrace
{ left brace.
RBrace
} right brace.
Comma
, comma separator.
Colon
: colon (type annotations, block starts).
Question
? question mark (ternary / optional).
At
@ at sign (timestamp literal prefix / decorator).
Integer(i64)
Integer literal (e.g., 42).
Float(f64)
Floating-point literal (e.g., 3.14, 1.0e10).
String(String)
String literal (double- or single-quoted).
Duration(String)
Duration literal (e.g., 5s, 100ms, 2h).
Timestamp(String)
Timestamp literal (e.g., @2024-01-15T10:30:00Z).
Ident(String)
Identifier (e.g., variable name, event type).
Eof
End-of-file sentinel token.
Trait Implementations§
Source§impl<'s> Logos<'s> for Token
impl<'s> Logos<'s> for Token
Source§type Error = ()
type Error = ()
#[logos(error = MyError)]. Defaults to () if not set.Source§type Extras = ()
type Extras = ()
Extras for the particular lexer. This can be set using
#[logos(extras = MyExtras)] and accessed inside callbacks.Source§type Source = str
type Source = str
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>>
Lexer. The implementation for this function
is generated by the logos-derive crate.