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
Added GSQL lexer #1809
Added GSQL lexer #1809
Conversation
pygments/lexers/gsql.py
Outdated
(r'.*\/\*\s*.*\s*\*\/', Comment.Multiline), | ||
], | ||
'keywords': [ | ||
(r'(ACCUM|AND|ANY|API|AS|ASC|AVG|BAG|BATCH|BETWEEN|BOOL|BOTH|' |
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.
Please use the words
function for long lists of keywords which can optimize the matching, see for instance: https://github.com/pygments/pygments/blob/master/pygments/lexers/python.py#L202
|
||
__all__ = ["GSQLLexer"] | ||
|
||
class GSQLLexer(RegexLexer): |
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.
Please add a comment describing this lexer -- ideally with a link to the language definition. This comment should end with .. versionadded:: 2.10
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.
@DanBarkus thanks for the great work 😄
@Anteru I can't wait to see this PR Merged 😄
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.
@DanBarkus Very cool! Can't wait to use it!
@Anteru Looking forward to the merge!
added link to language reference
All requested changes have been made. |
@DanBarkus thanks for completing this!! |
# 'name': [ | ||
# (r'(\@\@w+)\b', Name), | ||
# ], |
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.
Can you please remove this?
Merged, thanks! I'd appreciate if you could do a follow up commit to trim the example file a bit and reply to the question about |
I also had to regenerate the golden test files, could you please check that |
@DanBarkus This is also failing the docs build as it's missing the top-level comment which includes the copyright annotation. I'm reverting the PR for now until this is addressed. Please reopen once this is resolved. |
I've added the missing copyright annotation and removed the unnecessary commented out section of code. |
Added lexer for GSQL language and handling .gsql files