mirror of
https://github.com/rui314/chibicc
synced 2024-11-22 14:21:18 +03:00
15 lines
267 B
C
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;
|
|
}
|