Skip to content

fix line continuation parsing - #1698

Merged
palaviv merged 1 commit into
RustPython:masterfrom
palaviv:fix-line-continue
Jan 24, 2020
Merged

palaviv merged 1 commit into
RustPython:masterfrom
palaviv:fix-line-continue

Conversation

@palaviv

@palaviv palaviv commented Jan 24, 2020

Copy link
Copy Markdown
Contributor

Currently when we had a line continuation all lines numbers after were shifted by one. For example:

a = "aaaa" + \
		"bbbb"
1/0

Would say the exception was in line 2 instead of 3.

@coolreader18 coolreader18 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I noticed this too, but I wasn't sure what the specific cause was or how to fix it. This'll make debugging errors that originate in stdlib code a lot easier.

Comment thread tests/snippets/invalid_syntax.py Outdated
@palaviv
palaviv merged commit 8bc9157 into RustPython:master Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants