chibicc/main.c
2020-10-07 20:12:19 +09:00

15 lines
267 B
C

#include "chibicc.h"
int main(int argc, char **argv) {
if (argc != 2)
error("%s: invalid number of arguments", argv[0]);
Token *tok = tokenize(argv[1]);
Function *prog = parse(tok);
// Traverse the AST to emit assembly.
codegen(prog);
return 0;
}