@@ -225,9 +225,9 @@ int emit_asr(const std::string &infile,
225
225
std::cout << LCompilers::pickle_tree (*asr,
226
226
compiler_options.use_colors , with_intrinsic_modules) << std::endl;
227
227
} else if (compiler_options.po .json ) {
228
- std::cout << LCompilers::pickle_json (*asr, lm, with_intrinsic_modules) << std::endl;
228
+ std::cout << LCompilers::pickle_json (*asr, lm, compiler_options. po . no_loc , with_intrinsic_modules) << std::endl;
229
229
} else if (compiler_options.po .visualize ) {
230
- std::string astr_data_json = LCompilers::pickle_json (*asr, lm, with_intrinsic_modules);
230
+ std::string astr_data_json = LCompilers::pickle_json (*asr, lm, compiler_options. po . no_loc , with_intrinsic_modules);
231
231
return visualize_json (astr_data_json, compiler_options.platform );
232
232
} else {
233
233
std::cout << LCompilers::pickle (*asr, compiler_options.use_colors ,
@@ -1571,6 +1571,7 @@ int main(int argc, char *argv[])
1571
1571
app.add_flag (" --no-indent" , arg_no_indent, " Turn off Indented print ASR/AST" );
1572
1572
app.add_flag (" --tree" , compiler_options.po .tree , " Tree structure print ASR/AST" );
1573
1573
app.add_flag (" --json" , compiler_options.po .json , " Print ASR/AST Json format" );
1574
+ app.add_flag (" --no-loc" , compiler_options.po .no_loc , " Skip location information in ASR/AST Json format" );
1574
1575
app.add_flag (" --visualize" , compiler_options.po .visualize , " Print ASR/AST Visualization" );
1575
1576
app.add_option (" --pass" , arg_pass, " Apply the ASR pass and show ASR (implies --show-asr)" );
1576
1577
app.add_option (" --skip-pass" , skip_pass, " Skip an ASR pass in default pipeline" );
0 commit comments