aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-03-22 11:02:45 +0000
committerGitHub <noreply@github.com>2022-03-22 11:02:45 +0000
commit6ecd43c7797eb287f15d64f80f4654361c046f4a (patch)
tree4417cc20cd685d051fad702bc62b2cbea28b3133 /gcc/rust/parse/rust-parse.cc
parent32894e6986523cb6b0d4225f820d80a725546c3a (diff)
parenta64a5cf77c9685aa623ec69168e7f50324a102b9 (diff)
downloadgcc-6ecd43c7797eb287f15d64f80f4654361c046f4a.zip
gcc-6ecd43c7797eb287f15d64f80f4654361c046f4a.tar.gz
gcc-6ecd43c7797eb287f15d64f80f4654361c046f4a.tar.bz2
Merge #1040
1040: Do not propagate parse errors in match repetitions r=CohenArthur a=CohenArthur Since parsing repetitions is very eager, the parser might accumulate bogus errors by trying to match more repetitions than there are. We can avoid this by clearing the parsing errors if parsing repetitions returned a valid result. This should not be an issue for previous matchers erroring out, as they would immediately return upon failure and not reach inside other match functions. We need to figure out the best way to emit parser errors, as we do not always want to emit them in `match_fragment`. I think for now the easiest is to just *not* emit parse errors and simply error out with "failed to match macro rule". We will need to think about adding a bunch of hints too in order to make using macros easier. Fixes #958 Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse.cc')
0 files changed, 0 insertions, 0 deletions