character_reader
module · ferroui-base · v0.5.0
module character_reader
Forward-only character reader used by the hand-written grammars (binding expressions, selectors, property paths, container queries).
The reader works on Unicode scalar values (char) over a UTF-8 &str.
Differences from the upstream reader, which works on UTF-16 code units:
CharacterReader::positionand thecountarguments are measured inchars. For text in the Basic Multilingual Plane this is identical to upstream; a supplementary-plane character counts as one instead of two.- Reading at the end of the input never fails:
CharacterReader::peekandCharacterReader::takereturnNoneand thetake_if*methods returnfalse, where upstream raises an index-out-of-range error. Grammars turn the resulting state into a parse error.
The module also hosts the character classification helpers the grammars
share (is_white_space, is_letter, is_digit).
Contents
is_white_space— functionis_letter— functionis_digit— functionCharacterReader— struct
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.