]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: ast: Add Kind::MODULE
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 29 Mar 2023 14:56:12 +0000 (16:56 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:17 +0000 (18:34 +0100)
gcc/rust/ChangeLog:

* ast/rust-ast.h (enum Kind): Add MODULE variant.
* ast/rust-item.h: Return Kind::MODULE in AST::Module::get_kind().

gcc/rust/ast/rust-ast.h
gcc/rust/ast/rust-item.h

index 70d4d3ddc1c33119888f1cca5091bffdd0429776..8dfdba08cfa758b60b10768e043ac6ad1d17bdb4 100644 (file)
@@ -42,6 +42,7 @@ using AttrVec = std::vector<Attribute>;
 enum class Kind
 {
   UNKNOWN,
+  MODULE,
   MACRO_RULES_DEFINITION,
   MACRO_INVOCATION,
   IDENTIFIER,
index ec2bbe80067f022abbda34ff0242cda1d9679328..dec8ab7fc448530b1e9891c46798255925b3040d 100644 (file)
@@ -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;