Clean up a few details of lex yaml printing (#4845)

- Escape dumped token strings (what got me here)
- Change the quoting from backticks to quotes
- Also add a `FormatEscaped` helper function for this, updating other
`.write_escaped` uses
This commit is contained in:
Jon Ross-Perkins authored and GitHub committed 2025-01-24 21:52:02 +00:00
1 parent 22c0198835
commit b06fcc97f6
24 files changed
+255 -247

No files matched your search

+1 -3
View File
@@ -27,9 +27,7 @@ static auto GenerateCppIncludesHeaderCode(
std::string code;
llvm::raw_string_ostream code_stream(code);
for (const auto& [path, _] : imports) {
code_stream << "#include \"";
code_stream.write_escaped(path);
code_stream << "\"\n";
code_stream << "#include \"" << FormatEscaped(path) << "\"\n";
}
return code;
}