-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;
+struct ast_node;
+struct ast_expression;
+struct ast_value;
+struct ast_function;
+struct ast_block;
+struct ast_binary;
+struct ast_store;
+struct ast_binstore;
+struct ast_entfield;
+struct ast_ifthen;
+struct ast_ternary;
+struct ast_loop;
+struct ast_call;
+struct ast_unary;
+struct ast_return;
+struct ast_member;
+struct ast_array_index;
+struct ast_breakcont;
+struct ast_switch;
+struct ast_label;
+struct ast_goto;
+struct ast_argpipe;
+struct 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)
+};