-
Notifications
You must be signed in to change notification settings - Fork 347
Make regular expressions use character classes #605
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
Conversation
Upper case characters should use `[:upper:]`, identifiers can contain `[:alnum:]`s, etc. -- not `A-Z`, `A-Za-z0-9`, and so on. (`_` and `'` can stay, though.) Some things were left out -- for instance, looking for a `-XExtension` flag is guaranteed to use ASCII -- but I hope I got everything syntax-sensitive.
sigh Yes, you're right, I do want to create such a file :-) I don't think the places you highlighted ought to be |
Oh, I thought it matched whole identifier or module name... I remember fixing one such spot that said I would really love Anyway, you have my initial |
Copy of gracjan/haskell-mode@7893cc2ab4b8cdc1e37a753b8253ef13cdea8d67.
@antalsz: Any progress on this one? |
@gracjan: Sorry, I'm a grad student, and the end of the semester just hit :-) No real progress worth showing, but it is still on my radar (and once the end of semester detritus winds down, I'll be able to spend some more cycles on it). |
Good luck with your exams! For the lazy that didn't know the word (like me): http://en.wikipedia.org/wiki/Detritus |
@antalsz: Reminder that this one is needed very much! |
@antalsz: ping. Can you help out with this one? |
@antalsz: Are you able to return to this topic? |
Review status: 0 of 10 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. haskell-commands.el, line 417 [r2] (raw file): Comments from the review on Reviewable.io |
@antalsz: If you will find time to update this feel free to reopen or create a new pull request. This change is needed! |
Instead of using
A-Z
,a-z
,A-Za-z
, andA-Za-z0-9
, regular expressions for matching Haskell identifiers should use[:upper:]
,[:lower:]
,[:alpha:]
, and[:alnum:]
(_
,'
, and.
can stay, though.)This pull request doesn't change all such uses – for instance, looking for a
-XExtension
flag is guaranteed to use ASCII, and there are similar output-matching cases – but I hope I got everything syntax-sensitive.