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

Infinite Loop on C files #25

Closed
trishume opened this issue Dec 7, 2016 · 2 comments
Closed

Infinite Loop on C files #25

trishume opened this issue Dec 7, 2016 · 2 comments
Assignees

Comments

@trishume
Copy link
Owner

trishume commented Dec 7, 2016

There's an infinite loop bug on some C files due to a broken pattern in the default Sublime C syntax that can cause an infinite loop. Despite the pattern being borked syntect should handle this gracefully like Sublime Text obviously does.

Example

text: struct{estruct

First it matches

- match: '(?={{before_tag}})'
   push: data-structures

at position 8 and then matches

- match: '(?=\S)'
      pop: true

at the same position, and then repeats.

Possible solution

No single pattern should be able to trigger more than once at the same location. Maybe keep track of which patterns have triggered and ignore any further matches, resetting the store upon advancing. The trick is maintaining performance.

@trishume trishume self-assigned this Dec 7, 2016
@robinst
Copy link
Collaborator

robinst commented Dec 22, 2016

Is this released yet?

@trishume
Copy link
Owner Author

Whoops yah I forgot to release, thanks for reminding me.

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

No branches or pull requests

2 participants