diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-01 11:40:13 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-01 11:47:28 +0100 |
commit | cddb1f2d9f965aa6386a71369109edd61506118e (patch) | |
tree | 805aa6eeba52144e2ddd3d14c80d8a77bbc9a233 /gcc/gimple-array-bounds.cc | |
parent | d12a38da686e39952e083821f1d77116f3ed91af (diff) | |
download | gcc-cddb1f2d9f965aa6386a71369109edd61506118e.zip gcc-cddb1f2d9f965aa6386a71369109edd61506118e.tar.gz gcc-cddb1f2d9f965aa6386a71369109edd61506118e.tar.bz2 |
parser: Allow parsing multiple reference types
The parser now recursively tries to parse a reference type after seeing
a `&` or `&&` token.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_type): Handle double ampersan
properly
(Parser::parse_reference_type): Call into `parse_reference_type_inner`
and wrap double reference types in another `AST::ReferenceType` node
(Parser::parse_reference_type_inner): Add parsing implementation
which does not care about the leading token (& or &&)
(Parser::parse_type_no_bounds): Handle double ampersand properly
* parse/rust-parse.h: Declare `parse_reference_type_inner`
gcc/testsuite/ChangeLog:
* rust/compile/multi_reference_type.rs: New test.
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions