Module operator

Source
Expand description

Combined punctuation tokens are represented by Operator. The crate::operator! macro can be used to define custom operators.

Modules§

names
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.

Structs§

Operator
Operators made from up to four ASCII punctuation characters. Unused characters default to \0. Custom operators can be defined with the crate::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.