aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-02-16 13:03:45 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2022-02-17 09:43:48 +0100
commit45ca46018f034e50d37e6fdcd3d0de9c0ce74927 (patch)
tree46c2aa8c0da5a1cfd72b50fb4579ff000c2d46cc /gcc/rust/parse
parenta5272f389b02623b8bc4aaeafcf84013dae7c9fb (diff)
downloadgcc-45ca46018f034e50d37e6fdcd3d0de9c0ce74927.zip
gcc-45ca46018f034e50d37e6fdcd3d0de9c0ce74927.tar.gz
gcc-45ca46018f034e50d37e6fdcd3d0de9c0ce74927.tar.bz2
macrotranscriber: Add location info
Diffstat (limited to 'gcc/rust/parse')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h3
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 b500c87..ef0ad40 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -1691,7 +1691,8 @@ Parser<ManagedTokenSource>::parse_macro_rule ()
}
// parse transcriber (this is just a delim token tree)
- AST::MacroTranscriber transcriber (parse_delim_token_tree ());
+ Location token_tree_loc = lexer.peek_token ()->get_locus ();
+ AST::MacroTranscriber transcriber (parse_delim_token_tree (), token_tree_loc);
return AST::MacroRule (std::move (matcher), std::move (transcriber));
}