Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs exposed by syntax tests #55

Merged
merged 12 commits into from
Apr 4, 2017
Merged

Fix bugs exposed by syntax tests #55

merged 12 commits into from
Apr 4, 2017

Conversation

trishume
Copy link
Owner

@trishume trishume commented Apr 4, 2017

Fixes some bugs found by running Sublime's syntax tests. Mostly fixing #51 with a total overhaul of the push/pop/set behaviour. This is a collaboration with @keith-hall that I did a couple weeks ago but haven't finished yet.

@trishume
Copy link
Owner Author

trishume commented Apr 4, 2017

I just fixed top level scopes using the reduction method I mentioned in #58.

Now the syntax tests for almost all languages pass perfectly. The following languages still fail:

But things are now looking much much much better. Even the languages with failures produce highlighting that looks mostly correct.

@trishume
Copy link
Owner Author

trishume commented Apr 4, 2017

I did some benchmarking and didn't see any noticeable regression. There might be one of a percent or two but that doesn't really matter. It's easy to add a fast path later if it is needed.

I'm going to do some rebasing to get rid of redundant changing of the packs, then probably merge the package update and this.

keith-hall and others added 12 commits April 4, 2017 14:47
so that the meta scopes from the context being set from apply to the match pattern that invoked the set.
Fixes most syntax test failures in the Default Packages.
Makes it output a bit less things. This may have increased test failures
in ASP for some reason, even though I don't see anything that would change
the highlighting behaviour. I'll try and debug that...
The order of the captures matters for the order of the resulting
scope stack. It would also work with a BTreeMap but since we only
ever iterate it in order, a Vec is probably faster/better.
such assertion lines always pass due to the selector being empty
@trishume trishume changed the title [WIP] Fix bugs exposed by syntax tests Fix bugs exposed by syntax tests Apr 4, 2017
@trishume trishume merged commit 3955016 into master Apr 4, 2017
@trishume trishume deleted the fix-test-bugs branch April 4, 2017 18:53
@trishume trishume mentioned this pull request Apr 4, 2017
4 tasks
@trishume
Copy link
Owner Author

trishume commented Apr 4, 2017

I moved my comment about the things that are still failing to #59. Please discuss further failures there.

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