diff options
author | Galin Simeonov <gts@volconst.com> | 2021-06-01 18:21:02 +0300 |
---|---|---|
committer | Galin Simeonov <gts@volconst.com> | 2021-07-15 18:03:43 +0300 |
commit | 85b23fbee717f047af5a89eac6f4dba8e7812524 (patch) | |
tree | dc88ef3f4cb826f4f3a3c9e12c67562878460aa5 /src/program | |
parent | 255a49ba5a41b3854dbdfebdec75fb6229450507 (diff) | |
download | MEGATRON-85b23fbee717f047af5a89eac6f4dba8e7812524.tar.gz |
restructuring
Diffstat (limited to 'src/program')
-rw-r--r-- | src/program/program.c | 4 | ||||
-rw-r--r-- | src/program/program.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/program/program.c b/src/program/program.c index 5cf8cc3..1e7882d 100644 --- a/src/program/program.c +++ b/src/program/program.c @@ -48,6 +48,8 @@ struct Options* parse_command_line(int argc,char **argv) ret->target=OPTION_TARGET_TOKENS; else if(!strncmp(argv[i],"--print-ast",sizeof("--print-ast"))) ret->target=OPTION_TARGET_AST; + else if(!strncmp(argv[i],"--print-c",sizeof("--print-c"))) + ret->target=OPTION_TARGET_C; else if(!strncmp(argv[i],"-o",sizeof("-o")) || !strncmp(argv[i],"--output",sizeof("--output"))) { if(++i<argc) @@ -78,7 +80,7 @@ struct Options* parse_command_line(int argc,char **argv) } if(ret->target==OPTION_DEFAULT) - ret->target=OPTION_TARGET_AST; + ret->target=OPTION_TARGET_C; return ret; } diff --git a/src/program/program.h b/src/program/program.h index d5e45b7..99a02c3 100644 --- a/src/program/program.h +++ b/src/program/program.h @@ -14,6 +14,7 @@ enum Options_Target_Type { OPTION_TARGET_TOKENS, OPTION_TARGET_AST, + OPTION_TARGET_C, OPTION_DEFAULT, }; @@ -47,6 +48,7 @@ struct Translation_Data struct Queue *errors; struct Queue *tokens; size_t hold_number_of_errors; + struct Map *hold_command_map; }; struct Program { |