1 //===- SyntaxHighlighting.h -------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_LIB_DEBUGINFO_SYNTAXHIGHLIGHTING_H
11 #define LLVM_LIB_DEBUGINFO_SYNTAXHIGHLIGHTING_H
20 // Symbolic names for various syntax elements.
21 enum HighlightColor { Address, String, Tag, Attribute, Enumerator, Macro };
23 /// An RAII object that temporarily switches an output stream to a
29 /// To be used like this: WithColor(OS, syntax::String) << "text";
30 WithColor(raw_ostream &OS, enum HighlightColor Type);
33 raw_ostream& get() { return OS; }
34 operator raw_ostream& () { return OS; }
37 } // end namespace syntax
38 } // end namespace dwarf
40 } // end namespace llvm
42 #endif // LLVM_LIB_DEBUGINFO_SYNTAXHIGHLIGHTING_H