pythonparser icon indicating copy to clipboard operation
pythonparser copied to clipboard

Find a more reliable source origin for diagnostic

Open stevefan1999 opened this issue 3 years ago • 0 comments
trafficstars

Coming from https://github.com/m-labs/artiq/issues/1671:

It seems like one of the issue stems from here: https://github.com/m-labs/pythonparser/blob/5413ee5c9f8760e95c6acd5d6e88dabb831ad201/pythonparser/diagnostic.py#L51-L53

And indeed the evaluation of the expression shows there are more than 2 elements.

Screenshot from 2021-12-20 16-55-49

While the source is clearly different, and it kind of makes sense for the compiler to throw an error like this, shouldn't we find a better source of determining the source origin? Screenshot from 2021-12-20 16-59-22

stevefan1999 avatar Dec 20 '21 09:12 stevefan1999