File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -590,8 +590,14 @@ std::optional<std::string> AstFormatter::formatExpr(AstExpr* main_expr) {
590590 auto & string = string_list.data [0 ];
591591 insertEnd (result, string.begin (), string.end ());
592592 for (size_t i = 0 ; i < expr_list_size; i++) {
593+ const auto & item = expr_list.data [i];
594+ const bool item_is_table = item->is <AstExprTable>();
593595 appendChar (result, ' {' );
594- appendNode (expr_list.data [i], std::string (" interp_string->expressions.data[" ).append (convertNumber (i)) += ' ]' )
596+ if (item_is_table)
597+ appendChar (result, ' ' );
598+ appendNode (item, std::string (" interp_string->expressions.data[" ).append (convertNumber (i)) += ' ]' )
599+ if (item_is_table)
600+ appendChar (result, ' ' );
595601 appendChar (result, ' }' );
596602 auto & string = string_list.data [i + 1 ];
597603 insertEnd (result, string.begin (), string.end ());
You can’t perform that action at this time.
0 commit comments