bjpop / language-python

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

Fix #32: separate items in assign_to by equals signs instead of commas #33

Closed mkovaxx closed 7 years ago

mkovaxx commented 7 years ago

Fix for #32.

Both "x, y = 1" and "x = y = 1" are parsed correctly. Parsing "x, y = 1" yields an Assign node with an assign_to list of a single Tuple (which holds the two Vars for x and y). Parsing "x = y = 1" yields an Assign node with an assign_to list of two Vars for x and y.

Printing, however, separates items in the assign_to list by commas, which is incorrect.

bjpop commented 7 years ago

Thanks @mkovacs! Merged.