Even though the comma may be optional with blocks of expressions, it is
mandatory for a single expression alone. By changing this behavior we
ensure a working behavior with any kind of expressions.
gcc/rust/ChangeLog:
* ast/rust-ast-tokenstream.cc (TokenStream::visit): Make comma
mandatory.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
visit (match_case.get_arm ());
tokens.push_back (Rust::Token::make (MATCH_ARROW, Location ()));
visit (match_case.get_expr ());
- trailing_comma ();
+ tokens.push_back (Rust::Token::make (COMMA, Location ()));
}
void