libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
token_type.h
Go to the documentation of this file.
1
7#include "enum/enum.h"
8
9#define _T(token_type) PS_TOKEN_##token_type
10#define T(token_type) _T(token_type)
11
12// Comment from previous code (no clue what it means):
13
23
24// main
25ENUM(T(ID), "identifier")
26
27// keywords
28#include "token_type_keyword.h"
29ENUM(T(E), "exp")
30
31// symbols, operators
32#include "token_type_symbols_operators.h"
33
34// literals
35ENUM(T(LIT_DEC), "decimal-literal")
36ENUM(T(LIT_HEX), "hexadecimal-literal")
37ENUM(T(LIT_OCT), "octal-literal")
38ENUM(T(LIT_BIN), "binary-literal")
39ENUM(T(LIT_FLT), "float-literal")
40ENUM(T(LIT_CHR), "char-literal")
41ENUM(T(LIT_STR), "string-literal")
42ENUM(T(LIT_STR_INTERP), "string-literal-interp")
43
44// misc
45ENUM(T(UNKNOWN), "unknown")
46ENUM(T(NL), "newline")
47
48#undef T
49#undef _T
Custom enum definitions with associated data.
#define ENUM
#define T(token_type)
Definition token_type.h:10