浏览代码

AK: Display SourceLocation function name in color

It's much easier to spot the function name (which is what you often
expect) like this.
Ali Mohammad Pur 3 年之前
父节点
当前提交
2a1a619eed
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      AK/SourceLocation.h

+ 1 - 1
AK/SourceLocation.h

@@ -45,7 +45,7 @@ template<>
 struct AK::Formatter<AK::SourceLocation> : AK::Formatter<FormatString> {
     ErrorOr<void> format(FormatBuilder& builder, AK::SourceLocation location)
     {
-        return AK::Formatter<FormatString>::format(builder, "[{} @ {}:{}]", location.function_name(), location.filename(), location.line_number());
+        return AK::Formatter<FormatString>::format(builder, "[\x1b[34m{}\x1b[0m @ {}:{}]", location.function_name(), location.filename(), location.line_number());
     }
 };