cheatah
Source

stdlib/parsers/json/null.hpp

1// Copyright (c) 2026 BigBrain LLC. MIT-licensed (see LICENSE).
2// Original work; see ACKNOWLEDGMENTS.md for the open-source ideas we build upon.
3#pragma once
5// cheatah::parsers::json — the JSON `null` token. One class per JSON kind; see json.hpp.
7namespace cheatah::parsers::json {
9/** @brief The JSON `null` literal token. */
10class Null {
12public:
14 Null() = default;
15 ~Null() = default;
17 /**
18 * The value of `null` (there is no data; provided for a uniform value() interface).
19 * @return always nullptr.
20 * @complexity O(1).
21 * @alloc none.
22 * @test CheatahParsersJson.TokenClassesAndNodeVariant
23 */
24 [[nodiscard]] int* value() const noexcept { return nullptr; }
26};
28} // namespace cheatah::parsers::json