diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-02-17 15:03:28 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-02-18 09:08:07 +0100 |
commit | 205a9cbf9e2c2940e6715fa69be89765af582d29 (patch) | |
tree | 1351e475f58a84af20be46420870bebab2cf2ca9 /gcc/rust/parse/rust-parse-impl.h | |
parent | 9fb06d66cef70584e7aa2fa3a6ad22ef7def6b84 (diff) | |
download | gcc-205a9cbf9e2c2940e6715fa69be89765af582d29.zip gcc-205a9cbf9e2c2940e6715fa69be89765af582d29.tar.gz gcc-205a9cbf9e2c2940e6715fa69be89765af582d29.tar.bz2 |
fn-arg: Add location on parameter name
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 784e6d1..3d1f58b 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -5993,6 +5993,7 @@ Parser<ManagedTokenSource>::parse_named_function_param ( std::string name; const_TokenPtr t = lexer.peek_token (); + Location name_location = t->get_locus (); switch (t->get_id ()) { case IDENTIFIER: @@ -6028,7 +6029,7 @@ Parser<ManagedTokenSource>::parse_named_function_param ( } return AST::NamedFunctionParam (std::move (name), std::move (param_type), - std::move (outer_attrs)); + std::move (outer_attrs), name_location); } // Parses a statement (will further disambiguate any statement). |