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 Smithy Lexer (#1878) #1879
Conversation
immanuelqrw
commented
Aug 5, 2021
•
edited
edited
- Added Smithy Lexer
- Added Smithy Lexer author
- Documented Smithy as a supported language
- Added Smithy test file and output
* Added Smithy Lexer * Added Smithy Lexer auhtor * Documented Smithy as a supported language * Added Smithy test file and output
pygments/lexers/smithy.py
Outdated
(r'^(use|byte|short|integer|long|float|' | ||
r'document|double|bigInteger|bigDecimal|boolean|blob|string|timestamp)(\s+' + identifier + r')\b', | ||
bygroups(Keyword.Declaration, Name.Class)), | ||
(r'^(apply|list|map|set|structure|union|resource|operation|service|trait)(\s+' + identifier + r')', |
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.
We have a words()
function to efficiently match lists of words, can you please change those two to use that?
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.
Ah cool, added.
* Added Standard file heading with copyright and license * Used `words` method for optimization, instead of bare regex * Specified whitespace punctuation in root * Updated aliases to only contain lowercase names to pass `test_basic_api` tests * Updated regexes lightly to fit regexlint rules (removing duplicate characters in group `-`) * Fixed regexes with errors in regexlint rules (Escaping brackets, gaps in capture groups)
Thanks for the timely updates! |
* Ran mapping to update after changing aliases in previous commit
Forgot to re-run |
Not sure why
Error:
Seems like a randomly slow test event? |
Yes, that's a slow test failing once in a while. Don't worry :) |
Merged, thanks for your contribution! |