UTF-8 BOM handling
Marc
dkm@kataplop.net
Tue Jul 6 08:31:28 GMT 2021
Mark Wielaard <mark@klomp.org> writes:
> Hi,
>
> A rust source file can start with a UTF-8 BOM sequence (EF BB
> BF). This simply indicates that the file is encoded as UTF-8 (all rust
> input is interpreted as asequence of Unicode code points encoded in
> UTF-8) so can be skipped before starting real lexing.
>
> It isn't necessary to keep track of the BOM in the AST or HIR Crate
> classes. So I removed the has_utf8bom flag.
>
> Also included are a couple of simple tests to show we handle the BOM
> correctly now.
Merged : https://github.com/Rust-GCC/gccrs/pull/552
Marc
More information about the Gcc-rust
mailing list