libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
token_type_keyword.h
Go to the documentation of this file.
1
8#include "enum/enum.h"
9
10#if !defined(_T) && !defined(T)
11 #define _PD_OUT_OF_TOKEN_TYPE_H
12 #define _T(token_type) PS_TOKEN_##token_type
13 #define T(token_type) _T(token_type)
14#endif
15
16ENUM(T(LET), "let")
17ENUM(T(MUT), "mut")
18
19ENUM(T(FUNC), "fn")
20ENUM(T(FUNC_STATIC), "static")
21ENUM(T(FUNC_PUBLIC), "public")
22ENUM(T(FUNC_PRIVATE), "private")
23ENUM(T(FUNC_INLINE), "inline")
24
25ENUM(T(IMPORT), "import")
26ENUM(T(EXTERN), "extern")
27
28ENUM(T(TRAIT), "trait")
29ENUM(T(STRUCT), "struct")
30ENUM(T(IMPL), "impl")
31ENUM(PS_TOKEN_ENUM, "enum") // ENUM is already defined, so T(ENUM) won't work
32ENUM(T(FOR), "for")
33ENUM(T(IN), "in")
34ENUM(T(DO), "do")
35ENUM(T(WHILE), "while")
36ENUM(T(IF), "if")
37ENUM(T(ELSE), "else")
38ENUM(T(RET), "return")
39ENUM(T(LIT_TRUE), "true")
40ENUM(T(LIT_FALSE), "false")
41
42#ifdef _PD_OUT_OF_TOKEN_TYPE_H
43 #undef T
44 #undef _T
45#endif
46
47#ifdef _PD_OUT_OF_TOKEN_TYPE_H
48 #undef _PD_OUT_OF_TOKEN_TYPE_H
49#endif
#define in
#define for(__arr, __capture)
Definition dynarr.h:69
Custom enum definitions with associated data.
#define ENUM
#define T(token_type)