Enum proc_macro::Delimiter
1.29.0 · source · [−]pub enum Delimiter {
Parenthesis,
Brace,
Bracket,
None,
}
Expand description
Describes how a sequence of token trees is delimited.
Variants
Parenthesis
( ... )
Brace
{ ... }
Bracket
[ ... ]
None
Ø ... Ø
An implicit delimiter, that may, for example, appear around tokens coming from a
“macro variable” $var
. It is important to preserve operator priorities in cases like
$var * 3
where $var
is 1 + 2
.
Implicit delimiters might not survive roundtrip of a token stream through a string.