-
Notifications
You must be signed in to change notification settings - Fork 662
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
Add support for Arturo language #2259
Conversation
Sorry, I tried to use this function. (It was running on my local machine. Generating the files correctly). |
Because you used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch!
A lot of comments, but nothing major.
pygments/lexers/arturo.py
Outdated
(r'\:\w+', | ||
Keyword.Type) | ||
], | ||
'attributes': [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is not used (another danger of using too many trivial states...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- remove additional state
- I tried to just remove
constants
state, but I think the commit bellow is better
- I tried to just remove
- remove the high amount of trivial states
- I just removed that amount of states, put on
constants
, and added side notes. I think it's better.
- I just removed that amount of states, put on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still a few of them (punctuation, sugar, builtin-predicate-functions, maybe more...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@birkenfeld, do you think I need to remove operators
state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"need to" is too strong, but in general states that are only used as an include once are not technically needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
- it've used as a kind of hierarchy
- `.` matches char-by-char
Note: I'll test the file. Some of this changes may break something. |
@birkenfeld. Can You help me with something? So, in these lines I have string interpolation They are almost the same, except for the notation. Templates start with String Interpolation (broken): What should I do in this case? |
We had some problems with the last approach: - `.` is a char-by-char match, so it's inefficient - `Text` is too generic Why this replace: - `Text` shouldn't match indentifiers, `Name`, should - `Text.Whitespace` give us some semantic for whitespace - `Error` help us to find some problems on lexer
- note: `\w` includes digits (`[0-9]`) characters
Error:
My bad! I think it'll run now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice now, thanks!
Added changelog and fixed up code style a bit in a followup commit. |
Great work to all concerned! @RickBarretto, Jean (@jean-abou-samra) , Georg (@birkenfeld), Yanis (@drkameleon). Well done! 👍 |
Thanks Georg (@birkenfeld) for adding 8cb16e2. |
Also, thank you @birkenfeld for your help, reviews, comprehension and patience. 🙂 |
It was a pleasure :) |
This PR adds Arturo Language highlight support. 🙂
Arturo's Github
Arturo's Website