mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ASTDumper] Use color when printing identifiers
Print identifiers using color, when available.
This commit is contained in:
@@ -1895,11 +1895,14 @@ public:
|
||||
OS << " trailing-closure";
|
||||
|
||||
if (E->hasElementNames()) {
|
||||
OS << " names=";
|
||||
PrintWithColorRAII(OS, IdentifierColor) << " names=";
|
||||
|
||||
interleave(E->getElementNames(),
|
||||
[&](Identifier name) { OS << (name.empty()?"''":name.str());},
|
||||
[&] { OS << ","; });
|
||||
[&](Identifier name) {
|
||||
PrintWithColorRAII(OS, IdentifierColor)
|
||||
<< (name.empty()?"''":name.str());
|
||||
},
|
||||
[&] { PrintWithColorRAII(OS, IdentifierColor) << ","; });
|
||||
}
|
||||
|
||||
for (unsigned i = 0, e = E->getNumElements(); i != e; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user