]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: ast: Fix tokenstream extern block statements
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 4 Apr 2023 09:24:44 +0000 (11:24 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:28:43 +0000 (18:28 +0100)
commite2b0bc4a02379b93175d266306ebfa7900a84766
tree1e7f392436d6995d2a6129f7309ac10574e5dced
parent721bc1b926bbcd019bfdc19b626b3db45e8b01c5
gccrs: ast: Fix tokenstream extern block statements

The visitor created some additional semicolon between statements in
extern blocks, this lead to empty statement.

gcc/rust/ChangeLog:

* ast/rust-ast-tokenstream.cc (TokenStream::visit): Remove
additional semicolon output.
* ast/rust-ast-tokenstream.h: Change block visitor prototype
with a default value for trailing tokens.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-tokenstream.cc
gcc/rust/ast/rust-ast-tokenstream.h