ethereum/fe

v2 parser AugAssign stmt doesn't allow `x[0] += 1`

Closed this issue · 4 comments

What is wrong?

The new parser (v2 branch) only supports augmented-assignments where the LHS is an identifier. Eg x += 1 is supported, but x.y += 1 isn't.

How can it be fixed

Good opportunity for someone to become familiar with the new parser, I guess.

Y-Nak commented

If anyone is interested in this issue, please fork from Hir PR because I modified the parser in the PR.
The branch has been merged. Please fork fe-v2.

Y-Nak commented

It also seems necessary to fix the Assign statement, which wrongly assumes that its left-hand side is a pattern.
lhs should be a pattern or expression.

If v2 parser alows probe .smt insted of .stmt by using an incluide ... .smt.create.stmt":::::" meany that solve the problem.. find in your languague obviusly

Resolved in #985