raaahhhhhh
This commit is contained in:
@ -633,7 +633,7 @@ simple_statement:
|
||||
| RETURN expression {
|
||||
$$ = getTypeEntry((TableNode*)$2);
|
||||
emit_return(tn_or_const(NODE,(TableNode*)$2));}
|
||||
|simple_statement error {yyerrok; printdebug("error in simple statement");}
|
||||
|simple_statement error {yyerrok; yyclearin; printdebug("error in simple statement");}
|
||||
|
||||
|
||||
;
|
||||
|
@ -349,6 +349,11 @@ int label_gen(){
|
||||
}
|
||||
|
||||
void emit_as_file(FILE * out_file, Instruction * i){
|
||||
if (out_file == NULL){
|
||||
fprintf(stderr, "Error: output file is NULL\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if(i == NULL){
|
||||
return;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ int new_file(char *arg, char *alpha) {
|
||||
|
||||
mkdir("./out", 0777);
|
||||
|
||||
char *new_basename = calloc(strlen(basename) + 5, sizeof(char));
|
||||
char *new_basename = calloc(strlen(basename) + 7, sizeof(char));
|
||||
strcpy(new_basename, "./out/");
|
||||
strcat(new_basename, basename);
|
||||
basename = new_basename;
|
||||
|
Reference in New Issue
Block a user