diff options
author | Melody Horn <melody@boringcactus.com> | 2020-11-04 19:24:09 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2020-11-04 19:24:09 -0700 |
commit | 35979953a534bcdb2185de0a934e7937f319d687 (patch) | |
tree | be860937aae0aa46c486222e77d1e6db61d58206 /crowbar_reference_compiler/__init__.py | |
parent | eaf789901101b8958c2555a0af300d7471707fea (diff) | |
download | reference-compiler-35979953a534bcdb2185de0a934e7937f319d687.tar.gz reference-compiler-35979953a534bcdb2185de0a934e7937f319d687.zip |
switch from specific declarations to generic AST
Diffstat (limited to 'crowbar_reference_compiler/__init__.py')
-rw-r--r-- | crowbar_reference_compiler/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crowbar_reference_compiler/__init__.py b/crowbar_reference_compiler/__init__.py index c7baeea..53d942f 100644 --- a/crowbar_reference_compiler/__init__.py +++ b/crowbar_reference_compiler/__init__.py @@ -1,4 +1,7 @@ -from .declarations import load_declarations +import dataclasses +from pprint import pprint + +from .ast import build_ast from .parser import parse_header, parse_implementation from .scanner import scan from .ssagen import compile_to_ssa @@ -33,8 +36,8 @@ def main(): output_file.write(str(parse_tree)) return - decls = load_declarations(parse_tree, args.include_dir) - print(decls) + full_ast = build_ast(parse_tree, args.include_dir) + pprint(dataclasses.asdict(full_ast)) ssa = compile_to_ssa(parse_tree) if args.stop_at_qbe_ssa: |