#ifndef WONKY_STATEMENT_CONSTRAINTS_H
#define WONKY_STATEMENT_CONSTRAINTS_H WONKY_STATEMENT_CONSTRAINTS_H
#include <ast.h>
#include <type.h>
#include <common.h>
_Bool constraint_check_case_statement(struct AST_Case_Statement *case_statement,struct AST_Switch_Statement *parent,struct Translation_Data *translation_data);
/*_Bool constraint_check_default(struct ,struct Translation_Data *translation_data);*/
_Bool constraint_check_labeled_statement(struct AST_Labeled_Statement *label,struct Translation_Data *translation_data);
/*must have scallar controlling expression*/
_Bool constraint_check_if_statement(struct AST_If_Statement *if_statement,struct Translation_Data *translation_data);
/*must have integer controlling expresion*/
_Bool constraint_check_switch_statement(struct AST_Switch_Statement *switch_statement,struct Translation_Data *translation_data);
/*
the controlling statement shall have scalar type
the declaration part shall only declare identifiers for objects having storage class auto or reigster
*/
_Bool constraint_check_while_statement(struct AST_While_Statement *while_statement,struct Translation_Data *translation_data);
_Bool constraint_check_do_while_statement(struct AST_Do_While_Statement *do_while_statement,struct Translation_Data *translation_data);
_Bool constraint_check_for_statement(struct AST_For_Statement *for_statement,struct Translation_Data *translation_data);
_Bool constraint_check_goto_statement(struct AST_Goto_Statement *goto_statement,struct Translation_Data *translation_data);
_Bool constraint_check_break_continue_statement(struct AST_Break_Continue_Statement* break_statement,struct Translation_Data *translation_data);
/*must be in a function and must return with the function return type , empty expressions are premmited under functions returning void*/
_Bool constraint_check_return_statement(struct AST *return_expression,struct Type *return_type,struct Translation_Data *translation_data);
_Bool constraint_check_compound_statement(struct AST_Compound_Statement *block,struct Translation_Data *translation_data);
/*Not really a statement*/
_Bool constraint_check_function_definition(struct AST_Function_Definition *function,struct Translation_Data *translation_data);
#endif