working on generating an AST with scope and stuff

This commit is contained in:
SpookyDervish
2025-09-01 06:44:33 +10:00
parent 67fe809c57
commit eee9325ab8
6 changed files with 187 additions and 43 deletions

View File

@@ -1,17 +1,19 @@
from tokenizer import tokenize
from ground_ast import generate_ast
from rich import print
from time import time
def main():
start = time()
file = open("test.grnd", "r")
file = open("test2.grnd", "r")
code = file.read()
file.close()
tokens = tokenize(code)
ast = generate_ast(tokens, code)
compile_time = time()-start
print(tokens)
print(ast)
print(f"Compiled in {compile_time} seconds.")