public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] format-args: Add documentation for future expansion of function
@ 2024-05-07 16:16 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2024-05-07 16:16 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:61b5a058a49df3c78d2e0f8ac8ef3eca80b67971
commit 61b5a058a49df3c78d2e0f8ac8ef3eca80b67971
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date: Fri Mar 1 15:37:45 2024 +0100
format-args: Add documentation for future expansion of function
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc (MacroBuiltin::format_args_handler): Add
documentation regarding future tasks.
Diff:
---
gcc/rust/expand/rust-macro-builtins.cc | 26 +++++---------------------
1 file changed, 5 insertions(+), 21 deletions(-)
diff --git a/gcc/rust/expand/rust-macro-builtins.cc b/gcc/rust/expand/rust-macro-builtins.cc
index b42d1ec9367f..e4ca0d8ba3ba 100644
--- a/gcc/rust/expand/rust-macro-builtins.cc
+++ b/gcc/rust/expand/rust-macro-builtins.cc
@@ -1052,23 +1052,7 @@ MacroBuiltin::format_args_handler (location_t invoc_locus,
{
auto input = format_args_parse_arguments (invoc);
- // auto fmt_arg
- // // FIXME: this eneds to be split up into a smaller function
- // = parse_single_string_literal (append_newline ?
- // BuiltinMacro::FormatArgsNl
- // : BuiltinMacro::FormatArgs,
- // invoc.get_delim_tok_tree (), invoc_locus,
- // invoc.get_expander ());
-
- // if (!fmt_arg->is_literal ())
- // {
- // rust_sorry_at (
- // invoc_locus,
- // "cannot yet use eager macro invocations as format strings");
- // return AST::Fragment::create_empty ();
- // }
-
- // FIXME: We need to handle this
+ // TODO(Arthur): We need to handle this
// // if it is not a literal, it's an eager macro invocation - return it
// if (!fmt_expr->is_literal ())
// {
@@ -1077,10 +1061,10 @@ MacroBuiltin::format_args_handler (location_t invoc_locus,
// token_tree.to_token_stream ());
// }
- // auto fmt_str = static_cast<AST::LiteralExpr &> (*fmt_arg.get ());
-
- // Switch on the format string to know if the string is raw or cooked
- // switch (fmt_str.get_lit_type ())
+ // TODO(Arthur): Handle this as well - raw strings are special for the
+ // format_args parser auto fmt_str = static_cast<AST::LiteralExpr &>
+ // (*fmt_arg.get ()); Switch on the format string to know if the string is raw
+ // or cooked switch (fmt_str.get_lit_type ())
// {
// // case AST::Literal::RAW_STRING:
// case AST::Literal::STRING:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-07 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 16:16 [gcc/devel/rust/master] format-args: Add documentation for future expansion of function Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).