Enum pomsky_syntax::exprs::GroupItem
source · pub enum GroupItem {
Char(char),
Range {
first: char,
last: char,
},
Named {
name: GroupName,
negative: bool,
},
}Expand description
One item in a character class.
Variants§
Char(char)
A Unicode code point. It can be denoted in quotes (e.g. 'a') or in
hexadecimal notation (U+201).
Some non-printable ASCII characters are also parsed to a
GroupItem::Char: [n], [t], [r], [a], [e] and [f].
Range
A range of Unicode code points. It is denoted as A-B, where A and
B are Unicode code points, allowing the same notation as for
GroupItem::Char. Both A and B are included in the range.
Named
A named character class, i.e. a shorthand or a Unicode
category/script/block. Shorthands are [w], [s], [d], [v],
[h] and [R].
Some of them (w, d, s and Unicode) can be negated.