aboutsummaryrefslogtreecommitdiffstats
path: root/src/program
diff options
context:
space:
mode:
Diffstat (limited to 'src/program')
-rw-r--r--src/program/program.c4
-rw-r--r--src/program/program.h2
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
{