@@ -226,8 +226,8 @@ int emit_asr(const std::string &infile,
226226
227227 diagnostics.diagnostics .clear ();
228228 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
229- r = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics,
230- compiler_options, true , infile);
229+ r = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics,
230+ compiler_options, true , " " , infile);
231231 std::cerr << diagnostics.render (lm, compiler_options);
232232 if (!r.ok ) {
233233 LCOMPILERS_ASSERT (diagnostics.has_error ())
@@ -281,7 +281,7 @@ int emit_cpp(const std::string &infile,
281281
282282 diagnostics.diagnostics .clear ();
283283 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
284- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
284+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
285285 std::cerr << diagnostics.render (lm, compiler_options);
286286 if (!r1.ok ) {
287287 LCOMPILERS_ASSERT (diagnostics.has_error ())
@@ -326,7 +326,7 @@ int emit_c(const std::string &infile,
326326
327327 diagnostics.diagnostics .clear ();
328328 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
329- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
329+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
330330 std::cerr << diagnostics.render (lm, compiler_options);
331331 if (!r1.ok ) {
332332 LCOMPILERS_ASSERT (diagnostics.has_error ())
@@ -379,7 +379,7 @@ int emit_c_to_file(const std::string &infile, const std::string &outfile,
379379
380380 diagnostics.diagnostics .clear ();
381381 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
382- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
382+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
383383 std::cerr << diagnostics.render (lm, compiler_options);
384384 if (!r1.ok ) {
385385 LCOMPILERS_ASSERT (diagnostics.has_error ())
@@ -435,7 +435,7 @@ int emit_wat(const std::string &infile,
435435
436436 diagnostics.diagnostics .clear ();
437437 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
438- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
438+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
439439 std::cerr << diagnostics.render (lm, compiler_options);
440440 if (!r1.ok ) {
441441 LCOMPILERS_ASSERT (diagnostics.has_error ())
@@ -484,7 +484,7 @@ int get_symbols (const std::string &infile,
484484 if (r1.ok ) {
485485 LCompilers::LPython::AST::ast_t * ast = r1.result ;
486486 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
487- x = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
487+ x = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
488488 if (!x.ok ) {
489489 std::cout << " {}\n " ;
490490 return 0 ;
@@ -585,7 +585,7 @@ int get_errors (const std::string &infile,
585585 if (r1.ok ) {
586586 LCompilers::LPython::AST::ast_t * ast = r1.result ;
587587 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
588- r = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
588+ r = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
589589 }
590590 std::vector<LCompilers::error_highlight> diag_lists;
591591 LCompilers::error_highlight h;
@@ -705,7 +705,7 @@ int emit_llvm(const std::string &infile,
705705 LCompilers::LPython::AST::ast_t * ast = r.result ;
706706 diagnostics.diagnostics .clear ();
707707 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
708- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
708+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
709709 std::cerr << diagnostics.render (lm, compiler_options);
710710 if (!r1.ok ) {
711711 LCOMPILERS_ASSERT (diagnostics.has_error ())
@@ -780,8 +780,8 @@ int compile_python_to_object_file(
780780 diagnostics.diagnostics .clear ();
781781 auto ast_to_asr_start = std::chrono::high_resolution_clock::now ();
782782 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
783- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options,
784- !(arg_c && compiler_options.disable_main ), infile);
783+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options,
784+ !(arg_c && compiler_options.disable_main ), " " , infile);
785785
786786 auto ast_to_asr_end = std::chrono::high_resolution_clock::now ();
787787 times.push_back (std::make_pair (" AST to ASR" , std::chrono::duration<double , std::milli>(ast_to_asr_end - ast_to_asr_start).count ()));
@@ -898,7 +898,7 @@ int compile_to_binary_wasm(
898898 diagnostics.diagnostics .clear ();
899899 auto ast_to_asr_start = std::chrono::high_resolution_clock::now ();
900900 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
901- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
901+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
902902 auto ast_to_asr_end = std::chrono::high_resolution_clock::now ();
903903 times.push_back (std::make_pair (" AST to ASR" , std::chrono::duration<double , std::milli>(ast_to_asr_end - ast_to_asr_start).count ()));
904904 std::cerr << diagnostics.render (lm, compiler_options);
@@ -971,7 +971,7 @@ int compile_to_binary_x86(
971971 diagnostics.diagnostics .clear ();
972972 auto ast_to_asr_start = std::chrono::high_resolution_clock::now ();
973973 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
974- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
974+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
975975 auto ast_to_asr_end = std::chrono::high_resolution_clock::now ();
976976 times.push_back (std::make_pair (" AST to ASR" , std::chrono::duration<double , std::milli>(ast_to_asr_end - ast_to_asr_start).count ()));
977977 std::cerr << diagnostics.render (lm, compiler_options);
@@ -1045,7 +1045,7 @@ int compile_to_binary_wasm_to_x86(
10451045 diagnostics.diagnostics .clear ();
10461046 auto ast_to_asr_start = std::chrono::high_resolution_clock::now ();
10471047 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
1048- r1 = LCompilers::LPython::python_ast_to_asr (al, lm, *ast, diagnostics, compiler_options, true , infile);
1048+ r1 = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *ast, diagnostics, compiler_options, true , " " , infile);
10491049 auto ast_to_asr_end = std::chrono::high_resolution_clock::now ();
10501050 times.push_back (std::make_pair (" AST to ASR" , std::chrono::duration<double , std::milli>(ast_to_asr_end - ast_to_asr_start).count ()));
10511051 std::cerr << diagnostics.render (lm, compiler_options);
@@ -1341,7 +1341,7 @@ EMSCRIPTEN_KEEPALIVE char* emit_asr_from_source(char *input) {
13411341 if (ast.ok ) {
13421342 auto casted_ast = (LCompilers::LPython::AST::ast_t *)ast.result ;
13431343 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
1344- asr = LCompilers::LPython::python_ast_to_asr (al, lm, *casted_ast, diagnostics, compiler_options, true , " input" );
1344+ asr = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *casted_ast, diagnostics, compiler_options, true , " " , " input" );
13451345 out = diagnostics.render (lm, compiler_options);
13461346 if (asr.ok ) {
13471347 out += LCompilers::LPython::pickle (*asr.result , compiler_options.use_colors , compiler_options.indent ,
@@ -1359,7 +1359,7 @@ EMSCRIPTEN_KEEPALIVE char* emit_wat_from_source(char *input) {
13591359 if (ast.ok ) {
13601360 auto casted_ast = (LCompilers::LPython::AST::ast_t *)ast.result ;
13611361 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
1362- asr = LCompilers::LPython::python_ast_to_asr (al, lm, *casted_ast, diagnostics, compiler_options, true , " input" );
1362+ asr = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *casted_ast, diagnostics, compiler_options, true , " " , " input" );
13631363 out = diagnostics.render (lm, compiler_options);
13641364 if (asr.ok ) {
13651365 LCompilers::Result<LCompilers::Vec<uint8_t >>
@@ -1386,7 +1386,7 @@ EMSCRIPTEN_KEEPALIVE char* emit_cpp_from_source(char *input) {
13861386 if (ast.ok ) {
13871387 auto casted_ast = (LCompilers::LPython::AST::ast_t *)ast.result ;
13881388 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
1389- asr = LCompilers::LPython::python_ast_to_asr (al, lm, *casted_ast, diagnostics, compiler_options, true , " input" );
1389+ asr = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *casted_ast, diagnostics, compiler_options, true , " " , " input" );
13901390 out = diagnostics.render (lm, compiler_options);
13911391 if (asr.ok ) {
13921392 auto res = LCompilers::asr_to_cpp (al, *asr.result , diagnostics,
@@ -1424,7 +1424,7 @@ EMSCRIPTEN_KEEPALIVE char* emit_wasm_from_source(char *input) {
14241424 if (ast.ok ) {
14251425 auto casted_ast = (LCompilers::LPython::AST::ast_t *)ast.result ;
14261426 LCompilers::Result<LCompilers::ASR::TranslationUnit_t*>
1427- asr = LCompilers::LPython::python_ast_to_asr (al, lm, *casted_ast, diagnostics, compiler_options, true , " input" );
1427+ asr = LCompilers::LPython::python_ast_to_asr (al, lm, nullptr , *casted_ast, diagnostics, compiler_options, true , " " , " input" );
14281428 out = diagnostics.render (lm, compiler_options);
14291429 if (asr.ok ) {
14301430 LCompilers::Result<LCompilers::Vec<uint8_t >>
0 commit comments