pub fn parse_bytes(bytes: &[u8]) -> Result<CstDocument, LexError>Expand description
Parse raw bytes into a CstDocument, rejecting non-UTF-8 cleanly.
Uses the default ParseOptions.
ยงErrors
Returns LexError if bytes is not valid UTF-8 (TR-001/AD-008/INV-4).