GCC Middle and Back End API Reference
json-pointer-parsing.h
Go to the documentation of this file.
1/* JSON Pointer parsing (RFC 6901).
2 Copyright (C) 2026 Free Software Foundation, Inc.
3 Contributed by David Malcolm <dmalcolm@redhat.com>.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#ifndef GCC_JSON_POINTER_PARSING_H
22#define GCC_JSON_POINTER_PARSING_H
23
24#include "json.h"
25#include "json-parsing.h"
27
28namespace json {
29namespace pointer {
30
31class error
32{
33public:
35 : m_tokens (std::move (tokens))
36 {
37 }
38
40};
41
42/* Typedef for the result of parsing JSON pointer: borrowed json::value *
43 or of a json::pointer::error *. */
44typedef result<const json::value*,
45 std::unique_ptr<error>> parser_result_t;
46
47/* Function for parsing JSON pointer. */
48
49extern parser_result_t
50parse_utf8_string (const char *utf8_json_pointer,
51 const json::value *root_val);
52
53} // namespace pointer
54} // namespace json
55
56#endif /* GCC_JSON_POINTER_PARSING_H */
error(pretty_print_token_buffer tokens)
Definition json-pointer-parsing.h:34
pretty_print_token_buffer m_tokens
Definition json-pointer-parsing.h:39
Definition json.h:161
Definition pretty-print-token-buffer.h:32
Definition json-pointer-parsing.h:29
parser_result_t parse_utf8_string(const char *utf8_json_pointer, const json::value *root_val)
Definition json-pointer-parsing.cc:215
result< const json::value *, std::unique_ptr< error > > parser_result_t
Definition json-pointer-parsing.h:45
Definition cfghooks.h:27
Definition json-parsing.h:110
Definition ira-emit.cc:158