File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,6 @@ import argparse
2020import os
2121import sys
2222
23- from compiler .back_end .cpp import emboss_codegen_cpp , header_generator
24- from compiler .front_end import emboss_front_end
25-
2623
2724def _parse_args (argv ):
2825 parser = argparse .ArgumentParser (description = "Emboss compiler" )
@@ -72,6 +69,15 @@ def _parse_args(argv):
7269
7370def main (argv ):
7471 flags = _parse_args (argv )
72+ base_path = os .path .dirname (__file__ ) or "."
73+ sys .path .append (base_path )
74+
75+ from compiler .back_end .cpp import ( # pylint:disable=import-outside-toplevel
76+ emboss_codegen_cpp , header_generator
77+ )
78+ from compiler .front_end import ( # pylint:disable=import-outside-toplevel
79+ emboss_front_end
80+ )
7581
7682 ir , _ , errors = emboss_front_end .parse_and_log_errors (
7783 flags .input_file [0 ], flags .import_dirs , flags .color_output
You can’t perform that action at this time.
0 commit comments