mirror of
https://github.com/rui314/chibicc
synced 2024-12-03 11:11:55 +03:00
0b7663481d
No functional change
16 lines
287 B
C
16 lines
287 B
C
#include "chibicc.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
if (argc != 2)
|
|
error("%s: invalid number of arguments", argv[0]);
|
|
|
|
// Tokenize and parse.
|
|
Token *tok = tokenize(argv[1]);
|
|
Obj *prog = parse(tok);
|
|
|
|
// Traverse the AST to emit assembly.
|
|
codegen(prog);
|
|
|
|
return 0;
|
|
}
|