-
Notifications
You must be signed in to change notification settings - Fork 11
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
Regular expression support #3
Comments
R regex string is just a regular string. Not sure how to implement it. |
From @kylebarron on October 2, 2017 15:41 I tentatively got very basic functionality a while ago (with just assuming that a string in the first or second slot is meant to be the regex string). I'll try to add that into this repo. |
From @guillaumechaumet on October 2, 2017 15:48 By predicting every possibility like @kylebarron, it's possible. Nice job @kylebarron |
But the patterns can be stored as variables and then later be used in |
From @kylebarron on October 2, 2017 15:57 Yeah, it's not possible to get every pattern colored, but I personally think it's still worth it to color patterns in the most popular use cases. |
Hmm, you may also want to include |
From @kylebarron on October 3, 2017 14:25 Those are included... Pretty much all of
come from the |
From @kylebarron on October 2, 2017 4:56
Add regular expression support, similar to the implementations in language-python and language-stata.
This is non-trivial in R because it's harder to tell when a string is used to match something else, or when it's a literal string, and it should be matched. I looked through documentation and in general, the functions that have the regex in the first slot are
grep grepl regexpr gregexpr sub gsub regexec regex
, and the functions that have it in the second slot areHopefully I'll be able to use this to color the object in the first or second slot for those functions.
Note to self: Don't use syntax highlighting withing a
fixed()
call.Copied from original issue: REditorSupport/atom-language-r-legacy#5
The text was updated successfully, but these errors were encountered: