aboutsummaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-10-14 21:08:37 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-10-14 21:08:37 +0300
commit19ecd045e33ad66f27d859034141ccf09c8032b9 (patch)
tree337764d41ed2b8430b9a126cfef499a7258c44d7 /profile.c
parentff61236a00e0243b1f7be4bb6bfe63bc783cae06 (diff)
downloadegawk-19ecd045e33ad66f27d859034141ccf09c8032b9.tar.gz
egawk-19ecd045e33ad66f27d859034141ccf09c8032b9.tar.bz2
egawk-19ecd045e33ad66f27d859034141ccf09c8032b9.zip
Improvements for comments in do...while and debug dump.
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/profile.c b/profile.c
index 4cda2637..e4380280 100644
--- a/profile.c
+++ b/profile.c
@@ -843,9 +843,13 @@ cleanup:
indent(SPACEOVER);
t1 = pp_pop();
fprintf(prof_fp, "} %s (%s)", op2str(Op_K_while), t1->pp_str);
+ if (pc->comment)
+ fprintf(prof_fp, "\t%s", pc->comment->memory->stptr);
+ else {
+ end_line(pc->target_break);
+ skip_comment = true;
+ }
pp_free(t1);
- end_line(pc->target_break);
- skip_comment = true;
pc = pc->target_break;
break;