On Mon, Jun 19, 2023, 20:16 Chet Ramey <chet.ra...@case.edu> wrote: > On 6/18/23 4:59 AM, Grisha Levit wrote: > > On Sunday, May 28, 2023, Grisha Levit <grishale...@gmail.com> wrote: > > > >> Missing final `;': > >> > >> "$BASH" --pretty-print <<< $'${ : \;;}' > >> ${ : \; } > >> > > > > The latest set of fixes to this code solves these cases but others have > > issues: > > > > $ bash --pretty-print <<<$'${ : \;;\n}' > > ${ : \; } > > $ bash --pretty-print <<<$'${ : \;\n\n}' > > ${ : \; } > > $ bash --pretty-print <<<$'${ : \&;\n}' > > ${ : \& } > > $ bash --pretty-print <<<$'${ : \&;\n\n}' > > ${ : \& } > > > > I think it might be ok to just have print_comsub handle adding the final > > semicolon when needed instead of trying to add it after the fact in > > parse_comsub? > > I'll think about it. The advantage of doing it in parse_comsub is that > the parser has access to the token history, instead of having to intuit > it lexically. Along the lines of what Martin Kealey said, it's easy to > output a newline if the last token the parser read before the closing `}' > was a newline, and that solves this problem. >
if u wanna .. keep users newspaces and stuff like some 1 : 1 code print , u d just need to save the text/data between keywords thats not pretty print .. awk has it , or gawk , with split and patsplit , saves the 'in between' in an arr ( seps ) sadly this important pieces didnt make it to without function calling -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/ > > >