public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: Philip Herron <philip.herron@embecosm.com>
To: gcc-rust@gcc.gnu.org
Subject: Re: [PATCH] Pass pratt parsed token to expr parser functions to fix expr locus
Date: Fri, 6 Aug 2021 16:23:27 +0100	[thread overview]
Message-ID: <32bcf8f9-881e-d57f-470e-5f48fe78e200@embecosm.com> (raw)
In-Reply-To: <YQw98Ollx0Jzn0zt@wildebeest.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 1477 bytes --]

On 05/08/2021 20:37, Mark Wielaard wrote:
> Hi,
>
> On Fri, Jul 30, 2021 at 03:03:13AM +0200, Mark Wielaard wrote:
>> That variant is attached and can also be found here:
>> https://code.wildebeest.org/git/user/mjw/gccrs/commit/?h=pass-pratt-parse-loc
>> The original is also here:
>> https://code.wildebeest.org/git/user/mjw/gccrs/commit/?h=pass-pratt-parse-token
>>
>> Hopefully one of the two is acceptable. If not please let me know how
>> to rewrite it in a cheaper more idiomatic way.
> Any feedback on these patches? I really like to get the locations
> correct for these pratt parsed expressions. If both variants are
> problematic please let me know what I can do to improve them.
>
> Thanks,
>
> Mark
>
Hi Mark,

Sorry for lack of reply on this. After looking into this and also
getting Arthur Cohen to review, I think:

  * Token passing: If we end up using the token for more than the
    location this might be useful but at present I can't think of a
    use-case for the token. If we do need it maybe we could look into
    passing it by reference.
  * Location passing: I think this is the best solution and is directly
    associated with the issue you have fixed. The function says that you
    can call me but tell me the location as well so its up to the caller
    to handle this. We should add a comment to the function prototypes
    to say what the location is but that's it.

What do you think?

Thanks

--Phil


[-- Attachment #1.1.2: Type: text/html, Size: 2340 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

  reply	other threads:[~2021-08-06 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 22:13 Mark Wielaard
2021-07-29  1:25 ` The Other
2021-07-29 10:55   ` Mark Wielaard
2021-07-29 15:18     ` Thomas Schwinge
2021-07-30  1:03       ` Mark Wielaard
2021-08-05 19:37         ` Mark Wielaard
2021-08-06 15:23           ` Philip Herron [this message]
2021-08-07  1:01             ` Mark Wielaard
2021-08-08 11:53               ` Philip Herron
2021-08-09 14:24               ` Mark Wielaard

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=32bcf8f9-881e-d57f-470e-5f48fe78e200@embecosm.com \
    --to=philip.herron@embecosm.com \
    --cc=gcc-rust@gcc.gnu.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).