[PATCH] D156429: [TableGen] Add new bang operator !format
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 28 07:12:51 PDT 2023
simon_tatham added a comment.
"new string prefix": if you're talking about Python f-strings, then the brace-based formatting syntax predates those by a long way. You could write `"{0} {1}".format(a, b)` long before you could abbreviate it to `f"{a} {b}"`. But both of those syntaxes agree on writing a literal `{` or `}` by doubling it.
(And yes, I think the idea is that only the braces will ever need to be escaped in literal text, because everything else that's interesting in one of these format strings happens //inside// the braces, where different rules apply.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156429/new/
https://reviews.llvm.org/D156429
More information about the llvm-commits
mailing list