aboutsummaryrefslogtreecommitdiff
path: root/crowbar_reference_compiler/__init__.py
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-11-04 17:37:12 -0700
committerMelody Horn <melody@boringcactus.com>2020-11-04 17:37:12 -0700
commiteaf789901101b8958c2555a0af300d7471707fea (patch)
tree322eae2398cd6b3a994ba3d8bdc7f13d1f1b442d /crowbar_reference_compiler/__init__.py
parent68c303c285032e2f0398352b70eb79736a72296f (diff)
downloadreference-compiler-eaf789901101b8958c2555a0af300d7471707fea.tar.gz
reference-compiler-eaf789901101b8958c2555a0af300d7471707fea.zip
preserve more info about declarations
Diffstat (limited to 'crowbar_reference_compiler/__init__.py')
-rw-r--r--crowbar_reference_compiler/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/crowbar_reference_compiler/__init__.py b/crowbar_reference_compiler/__init__.py
index 7a46e01..c7baeea 100644
--- a/crowbar_reference_compiler/__init__.py
+++ b/crowbar_reference_compiler/__init__.py
@@ -16,8 +16,8 @@ def main():
args.add_argument('--stop-at-qbe-ssa', action='store_true')
args.add_argument('-S', '--stop-at-assembly', action='store_true')
args.add_argument('-c', '--stop-at-object', action='store_true')
- args.add_argument('-D', '--define-constant', help='define a constant with some literal value')
- args.add_argument('-I', '--include-dir', help='folder to look for included headers within')
+ args.add_argument('-D', '--define-constant', action='append', help='define a constant with some literal value')
+ args.add_argument('-I', '--include-dir', action='append', help='folder to look for included headers within')
args.add_argument('-o', '--out', help='output file')
args.add_argument('input', help='input file')
@@ -33,7 +33,8 @@ def main():
output_file.write(str(parse_tree))
return
- decls = load_declarations(parse_tree)
+ decls = load_declarations(parse_tree, args.include_dir)
+ print(decls)
ssa = compile_to_ssa(parse_tree)
if args.stop_at_qbe_ssa: