Skip to content

Instantly share code, notes, and snippets.

@hkaiser
Created April 26, 2018 13:41
Show Gist options
  • Save hkaiser/750001bcc9d7edd75789a627d3f363dd to your computer and use it in GitHub Desktop.
Save hkaiser/750001bcc9d7edd75789a627d3f363dd to your computer and use it in GitHub Desktop.
int main(int argc, char* argv[])
{
auto vm = handle_command_line(argc, argv);   
auto ast = read_ast(vm);   
if (need_transformation(vm))       
ast = transform_ast(vm, ast);   
auto result = compile_and_run(vm, ast);   
if (need_print_result(vm))       
cout << result;   
if (need_write_ast(vm))       
write_ast(vm, ast);   
if (need_print_instrumentation(vm))       
print_instrumentation(vm);   
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment