1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/parser/simplified_token.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/common/common.hpp"
12
13namespace duckdb {
14
15//! Simplified tokens are a simplified (dense) representation of the lexer
16//! Used for simple syntax highlighting in the tests
17enum class SimplifiedTokenType : uint8_t {
18 SIMPLIFIED_TOKEN_IDENTIFIER,
19 SIMPLIFIED_TOKEN_NUMERIC_CONSTANT,
20 SIMPLIFIED_TOKEN_STRING_CONSTANT,
21 SIMPLIFIED_TOKEN_OPERATOR,
22 SIMPLIFIED_TOKEN_KEYWORD,
23 SIMPLIFIED_TOKEN_COMMENT
24};
25
26struct SimplifiedToken {
27 SimplifiedTokenType type;
28 idx_t start;
29};
30
31enum class KeywordCategory : uint8_t { KEYWORD_RESERVED, KEYWORD_UNRESERVED, KEYWORD_TYPE_FUNC, KEYWORD_COL_NAME };
32
33struct ParserKeyword {
34 string name;
35 KeywordCategory category;
36};
37
38} // namespace duckdb
39