Implement builtin#format_args, using rustc's format_args parser

This commit is contained in:
Lukas Wirth 2023-09-05 19:06:15 +02:00
parent 3431d586e5
commit abe8f1ece4
19 changed files with 1740 additions and 14 deletions

View file

@ -382,7 +382,13 @@ AsmExpr =
Attr* 'builtin' '#' 'asm' '(' Expr ')'
FormatArgsExpr =
Attr* 'builtin' '#' 'format_args' '(' ')'
Attr* 'builtin' '#' 'format_args' '('
template:Expr
(',' args:(FormatArgsArg (',' FormatArgsArg)* ','?)? )?
')'
FormatArgsArg =
(Name '=')? Expr
MacroExpr =
MacroCall