evaluate.h 973 B

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