bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] pretty-print eats header comments


From: arnold
Subject: Re: [bug-gawk] pretty-print eats header comments
Date: Sun, 02 Nov 2014 06:10:13 -0700
User-agent: Heirloom mailx 12.4 7/29/08

I wrote about bugs in old code, but now you're finding bugs in new code
(:-); the master branch only recently acquired the ability to retain
comments for the pretty printer.

I'll get my guys right on it. :-)

Thanks,

Arnold

Hermann Peifer <address@hidden> wrote:

> Hi again.
>
> Arnold wrote the other day about excising remaining problems of the 
> pretty printer. Here is what I just found: header comments are gone in 
> cases where the BEGIN rule starts with a comment (see test1.awk) whereas 
> they are kept in the test2.awk example.
>
> Hermann
>
> ==> test1.awk <==
>
> $ cat test1.awk
> # Some
> # comments
> # here
> #
> BEGIN { # Field separator
>       FS = "\t"
> }
>
> $ awk -o/dev/stdout -f test1.awk
> # Field separator
> BEGIN {
>       FS = "\t"
> }
>
> ==> test2.awk <==
>
> $ cat test2.awk
> # Some
> # comments
> # here
> #
> BEGIN {
>       FS = "\t" # Field separator
> }
>
> $ awk -o/dev/stdout -f test2.awk
> # Some
> # comments
> # here
> #
> BEGIN {
>       FS = "\t"
>       # Field separator
> }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]