Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedihabb2 committed May 23, 2023
2 parents 77b9156 + 8377d72 commit 2d97c39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified GUI/MangaCC-Backend/mangcc
Binary file not shown.
8 changes: 4 additions & 4 deletions parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ param_call : | expr COMMA {
Symbol *s = void_to_symbol($1);
pop(last_declared_function->arguments_names[func_param_count], inFuncScope);
if (s->type != last_declared_function->arguments_types[func_param_count]) {
printf("Error: type mismatch in function call at line %d: expected: %d but found: %d\n", line_num, last_declared_function->arguments_types[func_param_count], s->type);
fprintf(console_logs, "Error: type mismatch in function call at line %d: expected: %d but found: %d\n", line_num, last_declared_function->arguments_types[func_param_count], s->type);
printf("Error: type mismatch in function call at line %d: expected: %s but found: %s\n", line_num, type_to_string(last_declared_function->arguments_types[func_param_count]), type_to_string(s->type));
fprintf(console_logs, "Error: type mismatch in function call at line %d: expected: %s but found: %s\n", line_num, type_to_string(last_declared_function->arguments_types[func_param_count]), type_to_string(s->type));
exit(1);
}
func_param_count++;
Expand All @@ -382,8 +382,8 @@ param_call : | expr COMMA {
Symbol *s = void_to_symbol($1);
pop(last_declared_function->arguments_names[func_param_count], inFuncScope);
if (s->type != last_declared_function->arguments_types[func_param_count]) {
printf("Error: type mismatch in function call at line %d: expected: %d but found: %d\n", line_num, last_declared_function->arguments_types[func_param_count], s->type);
fprintf(console_logs, "Error: type mismatch in function call at line %d: expected: %d but found: %d\n", line_num, last_declared_function->arguments_types[func_param_count], s->type);
printf("Error: type mismatch in function call at line %d: expected: %s but found: %s\n", line_num, type_to_string(last_declared_function->arguments_types[func_param_count]), type_to_string(s->type));
fprintf(console_logs, "Error: type mismatch in function call at line %d: expected: %s but found: %s\n", line_num, type_to_string(last_declared_function->arguments_types[func_param_count]), type_to_string(s->type));
exit(1);
}
func_param_count++;
Expand Down

0 comments on commit 2d97c39

Please sign in to comment.