WONKY



LOG | FILES | OVERVIEW


F diff --git a/src/debug/debug_ast.c b/src/debug/debug_ast.c --- a/src/debug/debug_ast.c +++ b/src/debug/debug_ast.c
[ST_FUNCTION_DEFINITION]=(debug_ast_function_ptr)is_valid_function_definition,
[ST_FUNCTION_DECLARATION]=(debug_ast_function_ptr)is_valid_function_declaration,
[TRANSLATION_UNIT]=(debug_ast_function_ptr)is_valid_translation_unit,
+ [ERROR_DECLARATION]=(debug_ast_function_ptr)is_valid_ast_error_declaration,
[ERROR]=(debug_ast_function_ptr)is_valid_ast_error,
};
return 0;
}
}
+ _Bool is_valid_ast_error_declaration(struct AST_Declaration_Error *error)
+ {
+ if(error==NULL || error->type!=ERROR_DECLARATION)
+ return 0;
+ else
+ {
+ if(error->error==NULL || is_valid_denoted(error->error))
+ return 1;
+ else
+ return 0;
+ }
+
+ }
_Bool is_valid_binary_expression(struct AST_Binary_Expression *expression)
{
if(expression==NULL || !is_valid_ast_expression_enum(expression->type))
F diff --git a/src/debug/debug_ast.h b/src/debug/debug_ast.h --- a/src/debug/debug_ast.h +++ b/src/debug/debug_ast.h
_Bool is_valid_ast(struct AST *ast);
_Bool is_valid_ast_expression(struct AST_Expression *expression);
_Bool is_valid_ast_error(struct AST_Error *error);
+ _Bool is_valid_ast_error_declaration(struct AST_Declaration_Error *error);
_Bool is_valid_binary_expression(struct AST_Binary_Expression *expression);
_Bool is_valid_pointer_addition_expression(struct AST_Pointer_Addition_Expression *addition);
_Bool is_valid_conditional_expression(struct AST_Conditional_Expression *conditional_expression);