tokenize ...

This commit is contained in:
Stefan Bühler 2023-07-22 11:09:41 +02:00
parent a66c2e05f9
commit 15199f869f

View File

@ -19,6 +19,8 @@ pub enum SimpleToken {
SemiColon, SemiColon,
/// `@` - lambda parameter alias /// `@` - lambda parameter alias
At, At,
/// `...` - accept unknown named parameters
Ellipsis,
/// `.` - attribute selection /// `.` - attribute selection
Dot, Dot,
/// `?` - has attribute /// `?` - has attribute
@ -125,6 +127,7 @@ fn simple_op(span: SpanRef) -> PResult<SpannedData<Token>> {
simple_tagged(":", SimpleToken::Colon), simple_tagged(":", SimpleToken::Colon),
simple_tagged(";", SimpleToken::SemiColon), simple_tagged(";", SimpleToken::SemiColon),
simple_tagged("@", SimpleToken::At), simple_tagged("@", SimpleToken::At),
simple_tagged("...", SimpleToken::Ellipsis),
simple_tagged(".", SimpleToken::Dot), simple_tagged(".", SimpleToken::Dot),
simple_tagged("?", SimpleToken::QuestionMark), simple_tagged("?", SimpleToken::QuestionMark),
simple_tagged("//", SimpleToken::DoubleSlash), simple_tagged("//", SimpleToken::DoubleSlash),