Skip to content

Commit 61b5a05

Browse files
committed
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.
1 parent 3ff0f1a commit 61b5a05

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

gcc/rust/expand/rust-macro-builtins.cc

+5-21
Original file line numberDiff line numberDiff line change
@@ -1052,23 +1052,7 @@ MacroBuiltin::format_args_handler (location_t invoc_locus,
10521052
{
10531053
auto input = format_args_parse_arguments (invoc);
10541054

1055-
// auto fmt_arg
1056-
// // FIXME: this eneds to be split up into a smaller function
1057-
// = parse_single_string_literal (append_newline ?
1058-
// BuiltinMacro::FormatArgsNl
1059-
// : BuiltinMacro::FormatArgs,
1060-
// invoc.get_delim_tok_tree (), invoc_locus,
1061-
// invoc.get_expander ());
1062-
1063-
// if (!fmt_arg->is_literal ())
1064-
// {
1065-
// rust_sorry_at (
1066-
// invoc_locus,
1067-
// "cannot yet use eager macro invocations as format strings");
1068-
// return AST::Fragment::create_empty ();
1069-
// }
1070-
1071-
// FIXME: We need to handle this
1055+
// TODO(Arthur): We need to handle this
10721056
// // if it is not a literal, it's an eager macro invocation - return it
10731057
// if (!fmt_expr->is_literal ())
10741058
// {
@@ -1077,10 +1061,10 @@ MacroBuiltin::format_args_handler (location_t invoc_locus,
10771061
// token_tree.to_token_stream ());
10781062
// }
10791063

1080-
// auto fmt_str = static_cast<AST::LiteralExpr &> (*fmt_arg.get ());
1081-
1082-
// Switch on the format string to know if the string is raw or cooked
1083-
// switch (fmt_str.get_lit_type ())
1064+
// TODO(Arthur): Handle this as well - raw strings are special for the
1065+
// format_args parser auto fmt_str = static_cast<AST::LiteralExpr &>
1066+
// (*fmt_arg.get ()); Switch on the format string to know if the string is raw
1067+
// or cooked switch (fmt_str.get_lit_type ())
10841068
// {
10851069
// // case AST::Literal::RAW_STRING:
10861070
// case AST::Literal::STRING:

0 commit comments

Comments
 (0)