aboutsummaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-11-26 20:52:23 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-11-26 20:52:23 +0200
commit1e6c88c44319694bfb2e9c0ca11db01ec670f0ad (patch)
tree72c69c3b8f3dd2f2af13e9d09d8d8ddc5b7be78f /profile.c
parented06eeafe3dc901759e20466446fec48e83402fc (diff)
downloadegawk-1e6c88c44319694bfb2e9c0ca11db01ec670f0ad.tar.gz
egawk-1e6c88c44319694bfb2e9c0ca11db01ec670f0ad.tar.bz2
egawk-1e6c88c44319694bfb2e9c0ca11db01ec670f0ad.zip
Continue polishing comments. New test.
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 5494b170..3041545a 100644
--- a/profile.c
+++ b/profile.c
@@ -1349,6 +1349,10 @@ print_comment(INSTRUCTION* pc, long in)
if (pc->comment) {
// chaining should only be two deep
assert(pc->comment->comment == NULL);
+ // if first was EOL comment, next must be block comment,
+ // it needs to be indented.
+ if (pc->memory->comment_type == EOL_COMMENT)
+ in++;
print_comment(pc->comment, in);
}
}