Improve with_prototype to better match Sublime. Fixes #101 #103
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I did a bunch of testing and figured on the details of Sublime's
with_prototype
behaviour around cases like described in #101.This PR implements a fix that:
with_prototypes
in the stack. It is now bottom to top like Sublime.with_prototype
contexts from stack frames lower than the last frame pushed by awith_prototype
rule.This reduces the number of failing syntax tests to 162 for ASP, 1 for LaTeX, and everything else passes. Previously ASP had 202 failing tests, fixing the order only got that down to 183. PHP also used to have 40 failing tests, although that jumped to 104 when I fixed the order, but that was just further exposing the other bug that when fixed brought it down to 0 failures. So this fixes #101 but not yet #59.
TODO
with_prototype
.cc @keith-hall