GCC Middle and Back End API Reference
|
Data Structures | |
struct | entry |
Public Member Functions | |
diagnostic_color_dict (const color_default *default_values, size_t num_default_values) | |
bool | parse_envvar_value (const char *const envvar_value) |
const char * | get_start_by_name (const char *name, size_t name_len) const |
const char * | get_start_by_name (const char *name) const |
Private Member Functions | |
const entry * | get_entry_by_name (const char *name, size_t name_len) const |
entry * | get_entry_by_name (const char *name, size_t name_len) |
Private Attributes | |
std::vector< entry > | m_entries |
diagnostic_color_dict::diagnostic_color_dict | ( | const color_default * | default_values, |
size_t | num_default_values ) |
diagnostic_color_dict's ctor. Initialize it from the given array of color_default values.
References m_entries.
|
private |
Non-const version of the above.
References m_entries.
|
private |
Look for an entry named NAME of length NAME_LEN within this diagnostic_color_dict, or nullptr if there isn't one.
References m_entries.
Referenced by get_start_by_name(), and parse_envvar_value().
|
inline |
References get_start_by_name().
const char * diagnostic_color_dict::get_start_by_name | ( | const char * | name, |
size_t | name_len ) const |
Return the SGR codes to start a color entry named NAME of length NAME_LEN within this diagnostic_color_dict, or the empty string if there isn't one.
References get_entry_by_name(), and diagnostic_color_dict::entry::m_val.
Referenced by colorize_start(), and get_start_by_name().
bool diagnostic_color_dict::parse_envvar_value | ( | const char *const | envvar_value | ) |
Parse a list of color definitions from an environment variable value (such as that of GCC_COLORS). No character escaping is needed or supported.
References b, get_entry_by_name(), diagnostic_color_dict::entry::m_val, NULL, SGR_END, SGR_SEQ, and SGR_START.
Referenced by parse_gcc_colors().
|
private |
Referenced by diagnostic_color_dict(), get_entry_by_name(), and get_entry_by_name().