Module names

Module names 

Source
Expand description

Unsynn does not implement rust grammar, for common Operators we make an exception because they are mostly universal and already partial lexed (Spacing::Alone/Joint) it would add a lot confusion when every user has to redefine common operator types. These operator names have their own module and are reexported at the crate root. This allows one to import only the named operators.

use unsynn::operator::names::*;
assert_tokens_eq!(Plus::new(), "+");

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
~