+ subcommand_output.json_output = NULL;
+ subcommand_output.needs_tree_render = false;
+ GENERATED_call(token->extra.call_identifier, &subcommand_output);
+ if (subcommand_output.json_output) {
+ DLOG("Subcommand JSON output: %s\n", subcommand_output.json_output);
+ char *buffer;
+ /* In the beginning, the contents of json_output are "[\0". */
+ if (command_output.json_output[1] == '\0')
+ sasprintf(&buffer, "%s%s", command_output.json_output, subcommand_output.json_output);
+ else sasprintf(&buffer, "%s, %s", command_output.json_output, subcommand_output.json_output);
+ free(command_output.json_output);
+ command_output.json_output = buffer;
+ DLOG("merged command JSON output: %s\n", command_output.json_output);
+ }
+ /* If any subcommand requires a tree_render(), we need to make the
+ * whole parser result request a tree_render(). */
+ if (subcommand_output.needs_tree_render)
+ command_output.needs_tree_render = true;