-
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 lexer for the Savi language. #1863
Conversation
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.
(Note that I am not a maintainer, just someone lurking around and hoping that a preliminary review will help. You could also review my own PR ;-)
(Update: "preliminary review" was written before I reloaded the page and saw @Anteru had already left some comments.)
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 lexer matches colons as Tag or Punctuation. Is that by design? It seems quite confusing.
class SaviLexer(RegexLexer): | ||
""" | ||
For `Savi <https://github.com/savi-lang/savi>`_ source code. | ||
""" |
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 needs a .. versionadded: 2.10
marker.
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.
Added in 63c1f63
Yes, it's by design. When a colon and immediately adjacent identifier are at the start of a line, together they form a tag that begins a declaration. Elsewhere the colon appears outside that one particular context, it is punctuation. |
Merged, thanks a lot! |
@Anteru - Thanks for merging this! Is there another release coming up soon that could make this lexer available to downstream tools? |
There is, I'm just swamped right now :( |
This PR adds a lexer for the Savi programming language.