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
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along 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
25namespace pp_markup {
26
27/* Print the JSON Pointer of a given json::value in quotes. */
28
30{
31public:
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
45private:
47};
48
49} // namespace pp_markup
50
51#endif /* GCC_PRETTY_PRINT_MARKUP_JSON_H */
Definition json.h:161
Definition pretty-print-markup.h:30
void add_to_phase_2(context &ctxt) final override
Definition pretty-print-markup-json.h:38
quoted_json_pointer(const json::value &js_val)
Definition pretty-print-markup-json.h:32
const json::value & m_js_val
Definition pretty-print-markup-json.h:46
pp_markup::element pp_element
Definition coretypes.h:177
Definition coretypes.h:176