GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "diagnostic.h"
#include "diagnostic-metadata.h"
#include "diagnostic-format.h"
#include "diagnostic-format-html.h"
#include "diagnostic-format-text.h"
#include "diagnostic-output-file.h"
#include "diagnostic-buffer.h"
#include "diagnostic-path.h"
#include "diagnostic-client-data-hooks.h"
#include "selftest.h"
#include "selftest-diagnostic.h"
#include "pretty-print-format-impl.h"
#include "pretty-print-urlifier.h"
#include "edit-context.h"
#include "intl.h"
#include "xml.h"
#include "xml-printer.h"
#include "json.h"
#include "selftest-xml.h"
Data Structures | |
class | diagnostic_html_format_buffer |
class | html_builder |
struct | html_doctypedecl |
class | html_path_label_writer |
class | html_token_printer |
class | html_output_format |
class | html_file_output_format |
Macros | |
#define | INCLUDE_MAP |
#define | INCLUDE_STRING |
#define | INCLUDE_VECTOR |
Functions | |
static std::unique_ptr< xml::element > | make_div (std::string class_) |
static std::unique_ptr< xml::element > | make_span (std::string class_) |
static void | add_nesting_level_attr (xml::element &element, int nesting_level) |
static const char * | get_pf_class_for_alert_div (diagnostic_t diag_kind) |
static const char * | get_pf_class_for_alert_icon (diagnostic_t diag_kind) |
static const char * | get_label_for_logical_location_kind (enum logical_location_kind kind) |
static void | add_labelled_value (xml::printer &xp, std::string id, std::string label, std::string value, bool quote_value) |
diagnostic_output_file | diagnostic_output_format_open_html_file (diagnostic_context &context, line_maps *line_maps, const char *base_file_name) |
std::unique_ptr< diagnostic_output_format > | make_html_sink (diagnostic_context &context, const line_maps &line_maps, const html_generation_options &html_gen_opts, diagnostic_output_file output_file) |
Variables | |
static const char *const | HTML_STYLE |
const char *const | HTML_SCRIPT |
#define INCLUDE_MAP |
HTML output for diagnostics. Copyright (C) 2024-2025 Free Software Foundation, Inc. Contributed by David Malcolm <dmalcolm@redhat.com>. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
#define INCLUDE_STRING |
#define INCLUDE_VECTOR |
|
static |
References xml::printer::add_text(), xml::printer::pop_tag(), xml::printer::push_tag(), xml::printer::set_attr(), and value.
Referenced by html_builder::make_element_for_diagnostic().
|
static |
References element.
Referenced by html_builder::add_at_nesting_level(), and html_builder::push_nesting_level().
diagnostic_output_file diagnostic_output_format_open_html_file | ( | diagnostic_context & | context, |
line_maps * | line_maps, | ||
const char * | base_file_name ) |
Attempt to open BASE_FILE_NAME.html for writing. Return a non-null diagnostic_output_file, or return a null diagnostic_output_file and complain to CONTEXT using LINE_MAPS.
References base_file_name(), diagnostic_context::emit_diagnostic_with_group(), fopen, and UNKNOWN_LOCATION.
Referenced by gcc::diagnostics_output_spec::html_scheme_handler::make_sink().
|
static |
References array, attribute, comment, declaration, dtd, element, function, gcc_unreachable, member, module_, namespace_, object, parameter, processing_instruction, property, return_type, text, type, unknown, value, and variable.
Referenced by html_builder::make_element_for_diagnostic().
|
static |
See https://pf3.patternfly.org/v3/pattern-library/widgets/#alerts
References gcc_unreachable.
Referenced by html_builder::make_element_for_diagnostic().
|
static |
References gcc_unreachable.
Referenced by html_builder::make_element_for_diagnostic().
|
static |
Referenced by html_builder::make_element_for_diagnostic().
std::unique_ptr< diagnostic_output_format > make_html_sink | ( | diagnostic_context & | context, |
const line_maps & | line_maps, | ||
const html_generation_options & | html_gen_opts, | ||
diagnostic_output_file | output_file ) |
References output_file.
Referenced by gcc::diagnostics_output_spec::html_scheme_handler::make_sink().
|
static |
const char* const HTML_SCRIPT |
A little JavaScript for ease of navigation. Keys j/k move forward and backward cyclically through a list of focus ids (written out in another <script> tag as the HTML is flushed).
|
static |
class html_builder.
Style information for writing out HTML paths. Colors taken from https://pf3.patternfly.org/v3/styles/color-palette/