diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-06-23 12:36:13 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-06-23 12:36:13 +0300 |
commit | 44e29458a6355ad64e8d89676a441b224ce76cbc (patch) | |
tree | c2cdddd3f873301845db9c6ad5cabe2b9c30df13 /awkgram.y | |
parent | 3f061027b6f0e2fe75b59d17efe93c0b84535b1a (diff) | |
download | egawk-44e29458a6355ad64e8d89676a441b224ce76cbc.tar.gz egawk-44e29458a6355ad64e8d89676a441b224ce76cbc.tar.bz2 egawk-44e29458a6355ad64e8d89676a441b224ce76cbc.zip |
Fix parenthesization in the pretty printer for real (we hope!).
Diffstat (limited to 'awkgram.y')
-rw-r--r-- | awkgram.y | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1738,7 +1738,12 @@ non_post_simp_exp } } | '(' exp r_paren - { $$ = $2; } + { + if (do_pretty_print) + $$ = list_append($2, bcalloc(Op_parens, 1, sourceline)); + else + $$ = $2; + } | LEX_BUILTIN '(' opt_fcall_expression_list r_paren { $$ = snode($3, $1); @@ -5909,7 +5914,7 @@ add_lint(INSTRUCTION *list, LINTTYPE linttype) // closest to the opcode if that opcode doesn't have one if (ip->source_line != 0) line = ip->source_line; - } + } if (do_lint) { /* compile-time warning */ if (isnoeffect(ip->opcode)) { |