added typedefs and type_env

This commit is contained in:
Andrew Segavac
2021-05-29 10:33:14 -06:00
parent f5fc6643fb
commit b8769f43e3
3 changed files with 118 additions and 41 deletions

View File

@@ -2,6 +2,7 @@ import sys
from typing import List
from boring.parse import boring_parser, TreeToBoring, pretty_print
from boring.type_checking import TypeChecker
from boring import typedefs
if __name__ == "__main__":
with open(sys.argv[1]) as f:
@@ -10,7 +11,7 @@ if __name__ == "__main__":
result = TreeToBoring().transform(tree)
# pretty_print(result)
type_checker = TypeChecker()
while type_checker.with_module({}, result):
while type_checker.with_module({}, typedefs.builtins, result):
print("loop")
# type_checker.with_module({}, result)
pretty_print(result)