您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

12 行
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. }