- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpylambda.py
More file actions
Latest commit
21 lines (18 loc) · 512 Bytes
/
Copy pathpylambda.py
File metadata and controls
21 lines (18 loc) · 512 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
fromsysimportargv
fromsrc.parserimportparse_file
fromsrc.typecheckerimporttypecheck_program
fromsrc.emitterimportemit, CLI
defhelp():
print("Expected args: python pylambda.py name_of_file.pylambda [--debug | --raw | --no-input]")
defmain():
iflen(argv) <2:
help()
exit()
cli=CLI()
iflen(argv) >2:
cli.set_args(argv[2:])
program=parse_file(argv[1])
typed=typecheck_program(program)
emit(typed, cli)
if__name__=="__main__":
main()