Inner attribute did not output exclamation tokens as there was no way to
differentiate inner from outer attributes previously.
gcc/rust/ChangeLog:
* ast/rust-ast-tokenstream.cc (TokenStream::visit): Fix inner
attribute tokenstream output.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
TokenStream::visit (Attribute &attrib)
{
tokens.push_back (Rust::Token::make (HASH, attrib.get_locus ()));
+ if (attrib.is_inner_attribute ())
+ tokens.push_back (Rust::Token::make (EXCLAM, Location ()));
tokens.push_back (Rust::Token::make (LEFT_SQUARE, Location ()));
visit (attrib.get_path ());