llvm/clang/include/clang/AST/ASTDumperUtils.h

//===--- ASTDumperUtils.h - Printing of AST nodes -------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements AST utilities for traversal down the tree.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_AST_ASTDUMPERUTILS_H
#define LLVM_CLANG_AST_ASTDUMPERUTILS_H

#include "llvm/Support/raw_ostream.h"

namespace clang {

/// Used to specify the format for printing AST dump information.
enum ASTDumpOutputFormat {};

// Colors used for various parts of the AST dump
// Do not use bold yellow for any text.  It is hard to read on white screens.

struct TerminalColor {};

// Red           - CastColor
// Green         - TypeColor
// Bold Green    - DeclKindNameColor, UndeserializedColor
// Yellow        - AddressColor, LocationColor
// Blue          - CommentColor, NullColor, IndentColor
// Bold Blue     - AttrColor
// Bold Magenta  - StmtColor
// Cyan          - ValueKindColor, ObjectKindColor
// Bold Cyan     - ValueColor, DeclNameColor

// Decl kind names (VarDecl, FunctionDecl, etc)
static const TerminalColor DeclKindNameColor =;
// Attr names (CleanupAttr, GuardedByAttr, etc)
static const TerminalColor AttrColor =;
// Statement names (DeclStmt, ImplicitCastExpr, etc)
static const TerminalColor StmtColor =;
// Comment names (FullComment, ParagraphComment, TextComment, etc)
static const TerminalColor CommentColor =;

// Type names (int, float, etc, plus user defined types)
static const TerminalColor TypeColor =;

// Pointer address
static const TerminalColor AddressColor =;
// Source locations
static const TerminalColor LocationColor =;

// lvalue/xvalue
static const TerminalColor ValueKindColor =;
// bitfield/objcproperty/objcsubscript/vectorcomponent
static const TerminalColor ObjectKindColor =;
// contains-errors
static const TerminalColor ErrorsColor =;

// Null statements
static const TerminalColor NullColor =;

// Undeserialized entities
static const TerminalColor UndeserializedColor =;

// CastKind from CastExpr's
static const TerminalColor CastColor =;

// Value of the statement
static const TerminalColor ValueColor =;
// Decl names
static const TerminalColor DeclNameColor =;

// Indents ( `, -. | )
static const TerminalColor IndentColor =;

class ColorScope {};

} // namespace clang

#endif // LLVM_CLANG_AST_ASTDUMPERUTILS_H