bjpop / language-python

A parser for Python 2.x and 3.x written in Haskell
157 stars 46 forks source link

Nested assignments misparsed #32

Closed jkoppel closed 7 years ago

jkoppel commented 7 years ago

"x = y = 1" gets incorrectly parsed to "x, y = 1", which gives an error when executed.

The fundamental problem is that assignments are treated as statements in the AST, even though they are not statements in the grammar.

bjpop commented 7 years ago

Thanks for the bug report. It was a problem with the pretty printer. Has been fixed in 7f6d3b2bb667394e73fb2d3be87cdd5f375ece18, thanks to a pull request from @mkovacs. Bumped version to 0.5.5.