From 76fc38b3cdfded2911b464baa7b182b5102318d1 Mon Sep 17 00:00:00 2001 From: Galin Simeonov Date: Thu, 3 Jun 2021 12:38:37 +0300 Subject: work on generated C code --- src/program/program.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/program/program.c') diff --git a/src/program/program.c b/src/program/program.c index 1e7882d..2632c57 100644 --- a/src/program/program.c +++ b/src/program/program.c @@ -40,6 +40,7 @@ struct Options* parse_command_line(int argc,char **argv) ret=malloc(sizeof(struct Options)); ret->target=OPTION_DEFAULT; ret->src_name=NULL; + ret->output_name=NULL; ret->is_quiet=0; for(i=0;isrc_name=argv[i]; + ret->output_name=argv[i]; else if(!ret->is_quiet) { fprintf(stderr,"Error: Output filename is too long"); @@ -182,4 +183,8 @@ void touch_errors(struct Translation_Data *translation_data) assert(translation_data->hold_number_of_errors>0); --translation_data->hold_number_of_errors; } +void push_error_with_token(char *error_message,struct Translation_Data *translation_data,struct token *token) +{ + Queue_Push(translation_data->errors,get_error(error_message,token->row,token->column)); +} #endif -- cgit v1.2.3