Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing $++a #167

Closed
benhoyt opened this issue Jan 23, 2023 · 0 comments · Fixed by #168
Closed

Error parsing $++a #167

benhoyt opened this issue Jan 23, 2023 · 0 comments · Fixed by #168

Comments

@benhoyt
Copy link
Owner

benhoyt commented Jan 23, 2023

Possibly related to #79, but opening a separate issue for visibility: GoAWK errors when parsing $++a. Compare:

$ echo -e '1 2 3\na b c\nd e f' | gawk '{ print $++a }'
1
b
f
$ echo -e '1 2 3\na b c\nd e f' | goawk '{ print $++a }'
<cmdline>:1:10: expected expression instead of ++
{ print $++a }
         ^
benhoyt added a commit that referenced this issue Feb 2, 2023
This matches gawk/mawk/original-awk behaviour.

Add tests, also add test for ++rvalue syntax error.

Fixes #167
benhoyt added a commit that referenced this issue Feb 2, 2023
This matches gawk/mawk/original-awk behaviour.

Add tests, also add test for ++rvalue syntax error.

Fixes #167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant