]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: ast: Add manual dispatch for meta item downcasting
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 20 Jun 2023 11:26:45 +0000 (13:26 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:55:58 +0000 (18:55 +0100)
commit5920e4b7579c664c17a07d126c7fb09f4d786849
tree5d0ac4e30b459b977ea648e75b6e97e5e6316f28
parent4d5f20fdbf095663ce829b42a22819093f4efc8e
gccrs: ast: Add manual dispatch for meta item downcasting

Several meta items shall be downcasted in various places, this commit
introduces values to dispatch on.

gcc/rust/ChangeLog:

* ast/rust-ast.h (class MetaItem): Add MetaItem dispatch values.
* ast/rust-expr.h: Add LitExpr and PathLit dispatch.
* ast/rust-macro.h: Add remaining dispatch getters.

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