1 | #pragma once |
2 | |
3 | #include <cstdint> |
4 | #include <string> |
5 | |
6 | namespace duckdb_libpgquery { |
7 | |
8 | enum class PGSimplifiedTokenType : uint8_t { |
9 | PG_SIMPLIFIED_TOKEN_IDENTIFIER, |
10 | PG_SIMPLIFIED_TOKEN_NUMERIC_CONSTANT, |
11 | PG_SIMPLIFIED_TOKEN_STRING_CONSTANT, |
12 | PG_SIMPLIFIED_TOKEN_OPERATOR, |
13 | PG_SIMPLIFIED_TOKEN_KEYWORD, |
14 | |
15 | }; |
16 | |
17 | struct PGSimplifiedToken { |
18 | PGSimplifiedTokenType type; |
19 | int32_t start; |
20 | }; |
21 | |
22 | enum class PGKeywordCategory : uint8_t { |
23 | PG_KEYWORD_RESERVED, |
24 | PG_KEYWORD_UNRESERVED, |
25 | PG_KEYWORD_TYPE_FUNC, |
26 | PG_KEYWORD_COL_NAME |
27 | }; |
28 | |
29 | struct PGKeyword { |
30 | std::string text; |
31 | PGKeywordCategory category; |
32 | }; |
33 | |
34 | } |
35 | |