Skip to content

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Mar 15, 2020

Turned out that column numbers in diagnostics used to be off by one, starting at 0 instead of 1.

Also took the opportunity to implement a line cache aiding in determining the line number for a given source position using a little binary search instead of walking the source. Saves a second or so on the non-parallel test suite (~1.8%).

In turn I also removed the Range#line and Range#column properties in preparation of making the AST more easily serializable eventually.

@dcodeIO dcodeIO requested a review from MaxGraey March 15, 2020 10:19
@dcodeIO dcodeIO merged commit 960890e into master Mar 15, 2020
@dcodeIO dcodeIO deleted the linecache branch March 15, 2020 13:34
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