1 #ifndef EVALUATE_H 2 #define EVALUATE_H 3 4 struct expression; 5 struct expression_list; 6 struct statement; 7 struct symbol; 8 struct symbol_list; 9 10 /// 11 // evaluate the type of an expression 12 // @expr: the expression to be evaluated 13 // @return: the type of the expression or ``NULL`` 14 // if the expression can't be evaluated 15 struct symbol *evaluate_expression(struct expression *expr); 16 17 /// 18 // evaluate the type of a statement 19 // @stmt: the statement to be evaluated 20 // @return: the type of the statement or ``NULL`` 21 // if it can't be evaluated 22 struct symbol *evaluate_statement(struct statement *stmt); 23 24 /// 25 // evaluate the type of a set of symbols 26 // @list: the list of the symbol to be evaluated 27 void evaluate_symbol_list(struct symbol_list *list); 28 29 /// 30 // evaluate the arguments of a function 31 // @argtypes: the list of the types in the prototype 32 // @args: the list of the effective arguments 33 int evaluate_arguments(struct symbol_list *argtypes, struct expression_list *args); 34 35 #endif 36