mirror of
https://github.com/rui314/chibicc
synced 2025-02-27 11:03:57 +03:00
16 lines
292 B
C
16 lines
292 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_file(argv[1]);
|
|
Obj *prog = parse(tok);
|
|
|
|
// Traverse the AST to emit assembly.
|
|
codegen(prog);
|
|
|
|
return 0;
|
|
}
|