Expand description
This module contains types for punctuation tokens. These are used to represent single and
multi character punctuation tokens. For single character punctuation tokens, there are
there are PunctAny, PunctAlone and PunctJoint types.
Combined punctuation tokens are represented by Operator. The operator! macro can be
used to define custom operators.
Structs§
- Operator
- Operators made from up to four ASCII punctuation characters. Unused characters default to
\0. Custom operators can be defined with theoperator!macro. All but the last character areSpacing::Joint. Attention must be payed when operators have the same prefix, the shorter ones need to be tried first. - Punct
Alone - A single character punctuation token which is not followed by another punctuation character.
- Punct
Any - A single character punctuation token with any kind of
Spacing, - Punct
Joint - A single character punctuation token where the lexer joined it with the next
Punctor a single quote followed by a identifier (rust lifetime).
Enums§
- Spacing
- Whether a
Punctis followed immediately by anotherPunctor followed by another token or whitespace.
Type Aliases§
- And
&- AndAnd
&&- AndEq
&=- Assign
=- At
@- Backslash
\- Bang
!- Caret
^- CaretEq
^=- Colon
:- Comma
,- Dollar
$- Dot
.- DotDot
..- DotDot
Eq ..=- Ellipsis
...- Equal
==- FatArrow
=>- Ge
>=- Gt
>- LArrow
<-- Le
<=- Lifetime
Tick 'WithSpacing::Joint- Lt
<- Minus
-- MinusEq
-=- NotEqual
!=- Or
|- OrEq
|=- OrOr
||- PathSep
::- Percent
%- Percent
Eq %=- Plus
+- PlusEq
+=- Pound
#- Question
?- RArrow
->- Semicolon
;- Shl
<<- ShlEq
<<=- Shr
>>- ShrEq
>>=- Slash
/- SlashEq
/=- Star
*- StarEq
*=- Tilde
~- Underscore
_