From: Marc <dkm@kataplop.net>
To: Mark Wielaard <mark@klomp.org>
Cc: gcc-rust@gcc.gnu.org
Subject: Re: UTF-8 BOM handling
Date: Tue, 06 Jul 2021 10:31:28 +0200 [thread overview]
Message-ID: <877di3268v.fsf@arrakis.kataplop.net> (raw)
In-Reply-To: <20210705193748.124938-1-mark@klomp.org> (Mark Wielaard's message of "Mon, 5 Jul 2021 21:37:46 +0200")
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
prev parent reply other threads:[~2021-07-06 8:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 19:37 Mark Wielaard
2021-07-05 19:37 ` [PATCH 1/2] Handle UTF-8 BOM in lexer Mark Wielaard
2021-07-05 19:37 ` [PATCH 2/2] Remove has_utf8bom flag from AST and HIR Crate classes Mark Wielaard
2021-07-06 8:31 ` Marc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877di3268v.fsf@arrakis.kataplop.net \
--to=dkm@kataplop.net \
--cc=gcc-rust@gcc.gnu.org \
--cc=mark@klomp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).