forked from Gscienty/libgraphql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathast.h
175 lines (143 loc) · 4.44 KB
/
ast.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#ifndef _LIBGRAPHQL_AST_H
#define _LIBGRAPHQL_AST_H
#include "string.h"
#include "linked_list.h"
typedef struct graphql_ast_loc_s graphql_ast_loc_t;
struct graphql_ast_loc_s {
int start;
int end;
const char *src;
};
typedef struct graphql_ast_node_s graphql_ast_node_t;
struct graphql_ast_node_s {
graphql_linked_list_t lh;
int kind;
graphql_ast_loc_t loc;
};
typedef struct graphql_ast_name_s graphql_ast_name_t;
struct graphql_ast_name_s {
graphql_ast_node_t node;
graphql_str_t val;
};
typedef struct graphql_ast_value_s graphql_ast_value_t;
struct graphql_ast_value_s {
graphql_ast_node_t node;
};
typedef struct graphql_ast_object_field_s graphql_ast_object_field_t;
struct graphql_ast_object_field_s {
graphql_ast_node_t node;
graphql_ast_name_t name;
graphql_ast_value_t val;
};
typedef struct graphql_ast_variable_s graphql_ast_variable_t;
struct graphql_ast_variable_s {
graphql_ast_value_t super;
graphql_ast_name_t name;
};
typedef struct graphql_ast_int_value_s graphql_ast_int_value_t;
struct graphql_ast_int_value_s {
graphql_ast_value_t super;
graphql_str_t val;
};
typedef struct graphql_ast_float_value_s graphql_ast_float_value_t;
struct graphql_ast_float_value_s {
graphql_ast_value_t super;
graphql_str_t val;
};
typedef struct graphql_ast_string_value_s graphql_ast_string_value_t;
struct graphql_ast_string_value_s {
graphql_ast_value_t super;
graphql_str_t val;
};
typedef struct graphql_ast_bool_value_s graphql_ast_bool_value_t;
struct graphql_ast_bool_value_s {
graphql_ast_value_t super;
int val;
};
typedef struct graphql_ast_enum_value_s graphql_ast_enum_value_t;
struct graphql_ast_enum_value_s {
graphql_ast_value_t super;
graphql_str_t val;
};
typedef struct graphql_ast_list_value_s graphql_ast_list_value_t;
struct graphql_ast_list_value_s {
graphql_ast_value_t super;
graphql_linked_list_t val;
};
typedef struct graphql_ast_list_value_item_s graphql_ast_list_value_item_t;
struct graphql_ast_list_value_item_s {
graphql_linked_list_t lh;
graphql_ast_value_t val;
};
typedef struct graphql_ast_object_field_value_s graphql_ast_object_field_value_t;
struct graphql_ast_object_field_value_s {
graphql_ast_value_t super;
graphql_linked_list_t val;
};
typedef struct graphql_ast_object_field_value_item_s graphql_ast_object_field_value_item_t;
struct graphql_ast_object_field_value_item_s {
graphql_linked_list_t lh;
graphql_ast_object_field_t val;
};
typedef struct graphql_ast_arg_s graphql_ast_arg_t;
struct graphql_ast_arg_s {
graphql_ast_node_t node;
graphql_ast_name_t name;
graphql_ast_value_t val;
};
typedef struct graphql_ast_directive_s graphql_ast_directive_t;
struct graphql_ast_directive_s {
graphql_ast_node_t node;
graphql_ast_name_t name;
graphql_linked_list_t args;
};
typedef struct graphql_ast_args_item_s graphql_ast_args_item_t;
struct graphql_ast_args_item_s {
graphql_linked_list_t lh;
graphql_ast_arg_t arg;
};
typedef struct graphql_ast_dirs_item_s graphql_ast_dirs_item_t;
struct graphql_ast_dirs_item_s {
graphql_linked_list_t lh;
graphql_ast_directive_t dir;
};
typedef struct graphql_ast_selection_set_s graphql_ast_selection_set_t;
typedef struct graphql_ast_selection_s graphql_ast_selection_t;
struct graphql_ast_selection_set_s {
graphql_ast_node_t node;
graphql_linked_list_t selections;
};
struct graphql_ast_selection_s {
int kind;
graphql_linked_list_t lh;
graphql_ast_selection_set_t selection_set;
};
typedef struct graphql_ast_field_s graphql_ast_field_t;
struct graphql_ast_field_s {
graphql_ast_selection_t selection;
graphql_ast_node_t node;
graphql_ast_name_t alias;
graphql_ast_name_t name;
graphql_linked_list_t args;
graphql_linked_list_t dirs;
};
typedef struct graphql_ast_fragment_spread_s graphql_ast_fragment_spread_t;
struct graphql_ast_fragment_spread_s {
graphql_ast_selection_t selection;
graphql_ast_node_t node;
graphql_ast_name_t name;
graphql_linked_list_t dirs;
};
typedef struct graphql_ast_inline_fragment_s graphql_ast_inline_fragment_t;
struct graphql_ast_inline_fragment_s {
graphql_ast_selection_t selection;
graphql_ast_node_t node;
graphql_ast_name_t type_condition;
graphql_linked_list_t dirs;
};
typedef struct graphql_ast_document_s graphql_ast_document_t;
struct graphql_ast_document_s {
graphql_ast_node_t node;
graphql_linked_list_t definitions;
};
#endif