benhoyt / goawk

A POSIX-compliant AWK interpreter written in Go, with CSV support
https://benhoyt.com/writings/goawk/
MIT License
1.95k stars 84 forks source link

Allow line break between `}` and `while` #219

Closed oguz-ismail closed 11 months ago

oguz-ismail commented 11 months ago

See:

$ goawk 'BEGIN{do{}
while(0)}'
<cmdline>:1:11: expected while instead of <newline>
BEGIN{do{}
          ^
$

POSIX allows line breaks after every closing brace, the one terminating a do group is no exception.

benhoyt commented 11 months ago

Fixed and merged in #220. Thanks for the report!