Skip to content

Commit

Permalink
Revert "valgrind"
Browse files Browse the repository at this point in the history
This reverts commit 3d3b383.
  • Loading branch information
Akuli committed Jan 9, 2025
1 parent fdffb04 commit baaace3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions bootstrap_compiler/jou_compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ typedef struct CfInstruction CfInstruction;
extern struct CommandLineArgs {
const char *argv0; // Program name
int verbosity; // How much debug/progress info to print, how many times -v/--verbose passed
bool valgrind; // true --> Use valgrind when runnning user's jou program
bool tokenize_only; // If true, tokenize the file passed on command line and don't actually compile anything
bool parse_only; // If true, parse the file passed on command line and don't actually compile anything
const char *infile; // The "main" Jou file (can import other files)
Expand Down
4 changes: 4 additions & 0 deletions bootstrap_compiler/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static const char help_fmt[] =
" -o OUTFILE output an executable file, don't run the code\n"
" -v / --verbose display some progress information\n"
" -vv display a lot of information about all compilation steps\n"
" --valgrind use valgrind when running the code\n"
" --tokenize-only display only the output of the tokenizer, don't do anything else\n"
" --parse-only display only the AST (parse tree), don't do anything else\n"
" --linker-flags appended to the linker command, so you can use external libraries\n"
Expand Down Expand Up @@ -76,6 +77,9 @@ void parse_arguments(int argc, char **argv)
} else if (strncmp(argv[i], "-v", 2) == 0 && strspn(argv[i] + 1, "v") == strlen(argv[i])-1) {
command_line_args.verbosity += strlen(argv[i]) - 1;
i++;
} else if (!strcmp(argv[i], "--valgrind")) {
command_line_args.valgrind = true;
i++;
} else if (!strcmp(argv[i], "--tokenize-only")) {
if (argc > 3) {
fprintf(stderr, "%s: --tokenize-only cannot be used together with other flags", argv[0]);
Expand Down

0 comments on commit baaace3

Please sign in to comment.