GCC Middle and Back End API Reference
pretty-print-markup-json.h
Go to the documentation of this file.
1
/* Copyright (C) 2026 Free Software Foundation, Inc.
2
Contributed by David Malcolm <dmalcolm@redhat.com>
3
4
This file is part of GCC.
5
6
GCC is free software; you can redistribute it and/or modify it under
7
the terms of the GNU General Public License as published by the Free
8
Software Foundation; either version 3, or (at your option) any later
9
version.
10
11
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12
WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with GCC; see the file COPYING3. If not see
18
<http://www.gnu.org/licenses/>. */
19
20
#ifndef GCC_PRETTY_PRINT_MARKUP_JSON_H
21
#define GCC_PRETTY_PRINT_MARKUP_JSON_H
22
23
#include "
pretty-print-markup.h
"
24
25
namespace
pp_markup
{
26
27
/* Print the JSON Pointer of a given json::value in quotes. */
28
29
class
quoted_json_pointer
:
public
pp_element
30
{
31
public
:
32
quoted_json_pointer
(
const
json::value
&js_val)
33
:
m_js_val
(js_val)
34
{
35
}
36
37
void
38
add_to_phase_2
(
context
&ctxt)
final
override
39
{
40
ctxt.begin_quote ();
41
m_js_val
.print_pointer (&ctxt.m_pp);
42
ctxt.end_quote ();
43
}
44
45
private
:
46
const
json::value
&
m_js_val
;
47
};
48
49
}
// namespace pp_markup
50
51
#endif
/* GCC_PRETTY_PRINT_MARKUP_JSON_H */
json::value
Definition
json.h:161
pp_markup::context
Definition
pretty-print-markup.h:30
pp_markup::quoted_json_pointer::add_to_phase_2
void add_to_phase_2(context &ctxt) final override
Definition
pretty-print-markup-json.h:38
pp_markup::quoted_json_pointer::quoted_json_pointer
quoted_json_pointer(const json::value &js_val)
Definition
pretty-print-markup-json.h:32
pp_markup::quoted_json_pointer::m_js_val
const json::value & m_js_val
Definition
pretty-print-markup-json.h:46
pp_element
pp_markup::element pp_element
Definition
coretypes.h:177
pp_markup
Definition
coretypes.h:176
pretty-print-markup.h
gcc
pretty-print-markup-json.h
Generated by
1.16.1