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 support function match patterns #78

Closed
wants to merge 1 commit into from

Conversation

Ingramz
Copy link
Contributor

@Ingramz Ingramz commented May 10, 2017

Fixes following errors found from TextMate's stderr:

ERROR unmatched close parenthesis ((?i)\bMongoDB\BSON\(to(JSON|PHP)|from(JSON|PHP))\b)
bad begin/match pattern for support.function.bson.php
ERROR unmatched close parenthesis ((?i)\bUI\(Draw\Text\Font\fontFamilies|quit|run)\b)
bad begin/match pattern for support.function.ui.php

@sorbits
Copy link
Member

sorbits commented Jul 12, 2017

I think the grammar is generated which is why these backslashes were not escaped.

I propose changing line 33 in generate.rb to this:

list.map! { |term| Regexp.escape(term).unpack('C*') }

And then re-generate the grammar.

@infininight Do you have a handle on this?

infininight added a commit that referenced this pull request Jul 16, 2017
This also fixes some escaping issues with the last generation pass mentioned in #78.
@infininight
Copy link
Member

As @sorbits said this part of the grammar is auto-generated and I missed manually correcting these escapes after the generation. The script has been corrected in 83298a0 and rerun based on 7.1.7. Thanks for the note.

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.

3 participants