Parser: accept exprs like `$$0++--`.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 27
- Forks
- 7
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 11
Description
Title. Isomorphic expressions also fail to parse. These should parse the same way we currently accept $($0++)--. This is a bug because GNU AWK does accept them, but very amusingly, their docs give it as an example of an incorrect expression:
Also, operators cannot be combined in a way that violates the precedence rules; for example,
$$0++--is not a valid expression because the first$has higher precedence than the++; to avoid the problem the expression can be rewritten as$($0++)--.
Thus, and if possible, I would like the patch to be easily revertible.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Rust parser entry points that handle prefix $ and postfix ++/--, then compare their behavior with the already accepted $($0++)-- form. Add regression coverage for $$0++-- and verify that it parses successfully while preserving existing precedence behavior; keep the parser change easy to revert.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100