Module punct

Source
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 the operator! macro. All but the last character are Spacing::Joint. Attention must be payed when operators have the same prefix, the shorter ones need to be tried first.
PunctAlone
A single character punctuation token which is not followed by another punctuation character.
PunctAny
A single character punctuation token with any kind of Spacing,
PunctJoint
A single character punctuation token where the lexer joined it with the next Punct or a single quote followed by a identifier (rust lifetime).

Enums§

Spacing
Whether a Punct is followed immediately by another Punct or followed by another token or whitespace.

Type Aliases§

And
&
AndAnd
&&
AndEq
&=
Assign
=
At
@
Backslash
\
Bang
!
Caret
^
CaretEq
^=
Colon
:
Comma
,
Dollar
$
Dot
.
DotDot
..
DotDotEq
..=
Ellipsis
...
Equal
==
FatArrow
=>
Ge
>=
Gt
>
LArrow
<-
Le
<=
LifetimeTick
' With Spacing::Joint
Lt
<
Minus
-
MinusEq
-=
NotEqual
!=
Or
|
OrEq
|=
OrOr
||
PathSep
::
Percent
%
PercentEq
%=
Plus
+
PlusEq
+=
Pound
#
Question
?
RArrow
->
Semicolon
;
Shl
<<
ShlEq
<<=
Shr
>>
ShrEq
>>=
Slash
/
SlashEq
/=
Star
*
StarEq
*=
Tilde
~
Underscore
_