Debian Codegraph @

gcc/d/dmd/common/charactertables.h

raw
1 /**
2 * Character tables related to identifiers.
3 *
4 * Supports UAX31, C99, C11 and least restrictive (All).
5 *
6 * Copyright: Copyright (C) 1999-2025 by The D Language Foundation, All Rights Reserved
7 * Authors: $(LINK2 https://cattermole.co.nz, Richard (Rikki) Andrew Cattermole)
8 * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
9 * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/compiler/src/dmd/common/charactertables.h, common/charactertables.d)
10 */
11
12 #pragma once
13
14 enum class IdentifierTable
15 {
16 UAX31,
17 C99,
18 C11,
19 LR, // Least Restrictive aka All
20 };
21
22 struct IdentifierCharLookup final
23 {
24 bool(*isStart)(char32_t);
25 bool(*isContinue)(char32_t);
26
27 // constructor not provided here.
28 static IdentifierCharLookup forTable(IdentifierTable table);
29 };