From 12ca8dbb4bc22da1b93630c884b75ce254605882 Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Thu, 15 Feb 2024 20:58:48 +0100 Subject: ast: Add base nodes for FormatArgs This commit adds a base for creating AST FormatArgs nodes after expanding invocations of `format_args!()`. These nodes will then be expanded to the proper runtime function calls (to core::fmt::rt) during the AST lowering. gcc/rust/ChangeLog: * ast/rust-builtin-ast-nodes.h: New file. * ast/rust-ast-full-decls.h (class FormatArgs): Declare new class. * ast/rust-ast-collector.cc: Handle FormatArgs nodes properly. * ast/rust-ast-collector.h: Likewise. * ast/rust-ast-full.h: Likewise. * ast/rust-ast-visitor.cc: Likewise. * ast/rust-ast-visitor.h: Likewise. * ast/rust-ast.cc: Likewise. * ast/rust-ast.h: Likewise. * expand/rust-derive.h: Likewise. * hir/rust-ast-lower-base.cc: Likewise. * hir/rust-ast-lower-base.h: Likewise. * hir/rust-ast-lower-expr.cc: Likewise. * hir/rust-ast-lower-expr.h: Likewise. * resolve/rust-ast-resolve-base.cc: Likewise. * resolve/rust-ast-resolve-base.h: Likewise. --- gcc/rust/expand/rust-derive.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/rust/expand/rust-derive.h') diff --git a/gcc/rust/expand/rust-derive.h b/gcc/rust/expand/rust-derive.h index 8fe29c0..f953c3d 100644 --- a/gcc/rust/expand/rust-derive.h +++ b/gcc/rust/expand/rust-derive.h @@ -221,6 +221,7 @@ private: virtual void visit (SelfParam ¶m) override final{}; virtual void visit (FunctionParam ¶m) override final{}; virtual void visit (VariadicParam ¶m) override final{}; + virtual void visit (FormatArgs ¶m) override final{}; }; } // namespace AST -- cgit v1.1