C++ Essence Library 0.1.0
A Utility Library for Modern C++ Programming
Loading...
Searching...
No Matches
language_tokens.hpp
1/*
2 * Copyright (c) 2024 The RefValue Project
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22
23#pragma once
24
25#include "../../char8_t_remediation.hpp"
26#include "../literal_string.hpp"
27
28#include <tuple>
29
30namespace essence::meta::detail {
35 static constexpr literal_string reference{U8("&")};
36 static constexpr literal_string dot{U8(".")};
37 static constexpr literal_string scope{U8("::")};
38 static constexpr literal_string arrow{U8("->")};
39 static constexpr literal_string comma{U8(",")};
40 static constexpr literal_string semicolon{U8(";")};
41
42 static constexpr literal_string enum_prefix{U8("enum ")};
43 static constexpr literal_string class_prefix{U8("class ")};
44 static constexpr literal_string struct_prefix{U8("struct ")};
45
46 static constexpr literal_string left_parentheses{U8("(")};
47 static constexpr literal_string left_angle_bracket{U8("<")};
48 static constexpr literal_string left_square_bracket{U8("[")};
49
50 static constexpr literal_string right_parentheses{U8(")")};
51 static constexpr literal_string right_angle_bracket{U8(">")};
52 static constexpr literal_string right_square_bracket{U8("]")};
53
54 static constexpr literal_string left_enclosing_tokens{
55 left_parentheses, left_angle_bracket, left_square_bracket};
56
57 static constexpr literal_string right_enclosing_tokens{
58 right_parentheses, right_angle_bracket, right_square_bracket};
59
60 static constexpr auto type_prefixes = std::forward_as_tuple(enum_prefix, class_prefix, struct_prefix);
61 };
62} // namespace essence::meta::detail
Some tokens of the C++ programming language.
Definition language_tokens.hpp:34
A literal type of collection of chars.
Definition literal_string.hpp:41