+typedef struct ast_node_common ast_node;
+typedef struct ast_expression_common ast_expression;
+
+typedef struct ast_value_s ast_value;
+typedef struct ast_function_s ast_function;
+typedef struct ast_block_s ast_block;
+typedef struct ast_binary_s ast_binary;
+typedef struct ast_store_s ast_store;
+typedef struct ast_binstore_s ast_binstore;
+typedef struct ast_entfield_s ast_entfield;
+typedef struct ast_ifthen_s ast_ifthen;
+typedef struct ast_ternary_s ast_ternary;
+typedef struct ast_loop_s ast_loop;
+typedef struct ast_call_s ast_call;
+typedef struct ast_unary_s ast_unary;
+typedef struct ast_return_s ast_return;
+typedef struct ast_member_s ast_member;
+typedef struct ast_array_index_s ast_array_index;
+typedef struct ast_breakcont_s ast_breakcont;
+typedef struct ast_switch_s ast_switch;
+typedef struct ast_label_s ast_label;
+typedef struct ast_goto_s ast_goto;
+typedef struct ast_argpipe_s ast_argpipe;
+typedef struct ast_state_s ast_state;
+
+enum {
+ AST_FLAG_VARIADIC = 1 << 0,
+ AST_FLAG_NORETURN = 1 << 1,
+ AST_FLAG_INLINE = 1 << 2,
+ AST_FLAG_INITIALIZED = 1 << 3,
+ AST_FLAG_DEPRECATED = 1 << 4,
+ AST_FLAG_INCLUDE_DEF = 1 << 5,
+ AST_FLAG_IS_VARARG = 1 << 6,
+ AST_FLAG_ALIAS = 1 << 7,
+ AST_FLAG_ERASEABLE = 1 << 8,
+ AST_FLAG_ACCUMULATE = 1 << 9,
+
+ /* An array declared as []
+ * so that the size is taken from the initializer
+ */
+ AST_FLAG_ARRAY_INIT = 1 << 10,
+
+ AST_FLAG_FINAL_DECL = 1 << 11,
+
+ /* Several coverage options
+ * AST_FLAG_COVERAGE means there was an explicit [[coverage]] attribute,
+ * which will overwrite the default set via the commandline switches.
+ * BLOCK_COVERAGE inserts coverage() calls into every basic block.
+ * In the future there might be more options like tracking variable access
+ * by creating get/set wrapper functions.
+ */
+ AST_FLAG_COVERAGE = 1 << 12,
+ AST_FLAG_BLOCK_COVERAGE = 1 << 13,
+
+ AST_FLAG_LAST,
+ AST_FLAG_TYPE_MASK = (AST_FLAG_VARIADIC | AST_FLAG_NORETURN),
+ AST_FLAG_COVERAGE_MASK = (AST_FLAG_BLOCK_COVERAGE)
+};
+
+enum {
+ TYPE_ast_node, /* 0 */
+ TYPE_ast_expression, /* 1 */
+ TYPE_ast_value, /* 2 */
+ TYPE_ast_function, /* 3 */
+ TYPE_ast_block, /* 4 */
+ TYPE_ast_binary, /* 5 */
+ TYPE_ast_store, /* 6 */
+ TYPE_ast_binstore, /* 7 */
+ TYPE_ast_entfield, /* 8 */
+ TYPE_ast_ifthen, /* 9 */
+ TYPE_ast_ternary, /* 10 */
+ TYPE_ast_loop, /* 11 */
+ TYPE_ast_call, /* 12 */
+ TYPE_ast_unary, /* 13 */
+ TYPE_ast_return, /* 14 */
+ TYPE_ast_member, /* 15 */
+ TYPE_ast_array_index, /* 16 */
+ TYPE_ast_breakcont, /* 17 */
+ TYPE_ast_switch, /* 18 */
+ TYPE_ast_label, /* 19 */
+ TYPE_ast_goto, /* 20 */
+ TYPE_ast_argpipe, /* 21 */
+ TYPE_ast_state /* 22 */
+};