nixd
Loading...
Searching...
No Matches
libnixf
include
nixf
Basic
TokenKinds.inc
Go to the documentation of this file.
1
/// TokenKinds.inc, token names.
2
3
/// provides: TOK(NAME), for all tokens.
4
5
/// note: keyword tokens will be prefixed with kw_ and they are declared in
6
/// TokenKeywords.inc
7
8
// Keywords goes here, they are special identifiers.
9
#ifdef TOK_KEYWORD
10
11
TOK_KEYWORD
(
if
)
12
TOK_KEYWORD
(then)
13
TOK_KEYWORD
(
else
)
14
TOK_KEYWORD
(assert)
15
TOK_KEYWORD
(with)
16
TOK_KEYWORD
(let)
17
TOK_KEYWORD
(in)
18
TOK_KEYWORD
(rec)
19
TOK_KEYWORD
(inherit)
20
TOK_KEYWORD
(or)
21
22
#endif
// TOK_KEYWORD
23
24
#ifdef TOK
25
TOK
(eof)
26
27
// Identifier.
28
TOK
(
id
)
29
30
// Numbers.
31
TOK
(
int
)
32
TOK
(
float
)
33
34
// Strings.
35
TOK
(dquote)
36
TOK
(string_part)
37
TOK
(string_escape)
// escaped string, e.g. \r \n \x \"
38
39
TOK
(quote2)
// ''
40
41
// Path.
42
TOK
(path_fragment)
43
44
// <path>
45
TOK
(spath)
46
47
// URI.
48
TOK
(uri)
49
50
// Interpolation.
51
TOK
(r_curly)
// {
52
TOK
(dollar_curly)
// ${
53
54
TOK
(ellipsis)
// ...
55
TOK
(comma)
// ,
56
TOK
(dot)
// .
57
TOK
(semi_colon)
// ;
58
TOK
(eq)
// =
59
TOK
(l_curly)
// {
60
TOK
(l_paren)
// (
61
TOK
(r_paren)
// )
62
TOK
(l_bracket)
// [
63
TOK
(r_bracket)
// ]
64
65
TOK
(question)
// ?
66
TOK
(at)
// @
67
TOK
(colon)
// :
68
69
TOK
(unknown)
70
71
TOK
(path_end)
// emtpy token, notifies the parser it should exit parsing path.
72
73
TOK
(op_not)
// !
74
75
#endif
// TOK
76
77
// Binary Ops
78
#ifdef TOK_BIN_OP
79
80
TOK_BIN_OP
(impl)
// ->
81
TOK_BIN_OP
(or)
// ||
82
TOK_BIN_OP
(and)
// &&
83
TOK_BIN_OP
(eq)
// ==
84
TOK_BIN_OP
(neq)
// !=
85
TOK_BIN_OP
(lt)
// <
86
TOK_BIN_OP
(gt)
// >
87
TOK_BIN_OP
(le)
// <=
88
TOK_BIN_OP
(ge)
// >=
89
TOK_BIN_OP
(update)
// //
90
TOK_BIN_OP
(add)
// +
91
TOK_BIN_OP
(negate)
// -
92
TOK_BIN_OP
(mul)
// *
93
TOK_BIN_OP
(div)
// /
94
TOK_BIN_OP
(concat)
// ++
95
96
// [RFC 0418 Pipe operator](https://github.com/NixOS/rfcs/pull/148)
97
TOK_BIN_OP
(pipe_into)
// |>
98
TOK_BIN_OP
(pipe_from)
// <|
99
100
#endif
// TOK_BIN_OP
TOK_BIN_OP
#define TOK_BIN_OP(NAME)
Tokens.inc, merge all tokens under "TOK".
Definition
TokenKinds.h:11
TOK_KEYWORD
#define TOK_KEYWORD(NAME)
Definition
TokenKinds.h:12
TOK
#define TOK(NAME)
Definition
TokenKinds.h:6
Generated by
1.12.0