diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-12-02 21:01:21 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-12-02 21:01:21 +0200 |
commit | 8f20ce9c6198e6c2f4705e4d53084fd48cd30a75 (patch) | |
tree | c3831b66e277c9ad2d0dcdb46e31bf5f0c2cde06 | |
parent | ee2f450c7cf2550ca68fb205c5df22eca13e5b74 (diff) | |
download | egawk-8f20ce9c6198e6c2f4705e4d53084fd48cd30a75.tar.gz egawk-8f20ce9c6198e6c2f4705e4d53084fd48cd30a75.tar.bz2 egawk-8f20ce9c6198e6c2f4705e4d53084fd48cd30a75.zip |
Additional commenting fix.
-rwxr-xr-x | ChangeLog | 5 | ||||
-rw-r--r-- | awkgram.c | 10 | ||||
-rw-r--r-- | awkgram.y | 10 |
3 files changed, 25 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2018-12-02 Arnold D. Robbins <arnold@skeeve.com> + + * awkgram.y (mk_program): Add in leading and trailing comments + when program block is empty. + 2018-11-29 Arnold D. Robbins <arnold@skeeve.com> * awkgram.y (first_rule, func_first): Remove unused variables. @@ -5075,6 +5075,16 @@ mk_program() (void) list_merge(cp, beginfile_block); (void) list_merge(cp, endfile_block); + if (outer_comment != NULL) { + cp = list_merge(list_create(outer_comment), cp); + outer_comment = NULL; + } + + if (interblock_comment != NULL) { + (void) list_append(cp, interblock_comment); + interblock_comment = NULL; + } + goto out; } else { @@ -2610,6 +2610,16 @@ mk_program() (void) list_merge(cp, beginfile_block); (void) list_merge(cp, endfile_block); + if (outer_comment != NULL) { + cp = list_merge(list_create(outer_comment), cp); + outer_comment = NULL; + } + + if (interblock_comment != NULL) { + (void) list_append(cp, interblock_comment); + interblock_comment = NULL; + } + goto out; } else { |