diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-03-29 16:56:12 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:34:17 +0100 |
commit | c532c201b360fcddc84f687e795248c132ba4787 (patch) | |
tree | b649905c7c9d3defa0bb768da09f084dac0ef63e | |
parent | cf1287ee24c5c83b38737c50e3cd37ab62f3d279 (diff) | |
download | gcc-c532c201b360fcddc84f687e795248c132ba4787.zip gcc-c532c201b360fcddc84f687e795248c132ba4787.tar.gz gcc-c532c201b360fcddc84f687e795248c132ba4787.tar.bz2 |
gccrs: ast: Add Kind::MODULE
gcc/rust/ChangeLog:
* ast/rust-ast.h (enum Kind): Add MODULE variant.
* ast/rust-item.h: Return Kind::MODULE in AST::Module::get_kind().
-rw-r--r-- | gcc/rust/ast/rust-ast.h | 1 | ||||
-rw-r--r-- | gcc/rust/ast/rust-item.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 70d4d3d..8dfdba0 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -42,6 +42,7 @@ using AttrVec = std::vector<Attribute>; enum class Kind { UNKNOWN, + MODULE, MACRO_RULES_DEFINITION, MACRO_INVOCATION, IDENTIFIER, diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h index ec2bbe8..dec8ab7 100644 --- a/gcc/rust/ast/rust-item.h +++ b/gcc/rust/ast/rust-item.h @@ -1000,6 +1000,8 @@ public: Identifier get_name () const { return module_name; } + Kind get_ast_kind () const override { return Kind::MODULE; } + private: Identifier module_name; Location locus; |