Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

12 wiersze
365 B

  1. void assert_type (Ast_Node* node, Ast_Node_Type type) {
  2. if (node->type == type) return;
  3. char *wanted, *got, *message;
  4. wanted = Ast_Node_Type_to_string(type);
  5. got = Ast_Node_Type_to_string(node->type);
  6. asprintf(&message, "Type assertion failed:\n\t"
  7. "Wanted: %s\n\t"
  8. "Got : %s\n", wanted, got);
  9. panic(message);
  10. }