Skip to content

Added Berry Lexer#2070

Merged
birkenfeld merged 15 commits into
pygments:masterfrom
Beormund:master
Mar 7, 2022
Merged

Added Berry Lexer#2070
birkenfeld merged 15 commits into
pygments:masterfrom
Beormund:master

Conversation

@Beormund
Copy link
Copy Markdown
Contributor

Added berry lexer, example file, and tested against lexer with no errors. Regenerated _mapping.py to include berry lexer.

Added Berry Lexer with example file and passed test output. _mapping.py regenerated.
When def is used in an anonymouse function it was being classified as a function name not Keyword.Declaration.
This reverts commit 9e2dc8a.
This reverts commit f655a8f.
Added berry lexer, example file, and tested against lexer with no errors. Regenerated _mapping.py to include berry lexer.
Copy link
Copy Markdown
Contributor

@jeanas jeanas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Most of my comments are mundane, be sure to test the fix for catastrophic backtracking though.

Comment thread pygments/lexers/berry.py
Comment thread pygments/lexers/berry.py Outdated
Comment thread pygments/lexers/berry.py Outdated
Comment thread pygments/lexers/berry.py Outdated
Comment thread pygments/lexers/berry.py Outdated
Comment thread pygments/lexers/berry.py Outdated
Comment thread pygments/lexers/berry.py Outdated
Comment thread pygments/lexers/berry.py Outdated
Comment thread pygments/lexers/berry.py Outdated
Comment thread pygments/lexers/berry.py Outdated
@jeanas jeanas added the update needed Waiting for an update from the PR/issue creator label Mar 2, 2022
1. Added license header
2. Added doc string
3. Ran make check - OK
4. Streamlined regexes
5. Fixed catastrophic backtracking
@Beormund
Copy link
Copy Markdown
Contributor Author

Beormund commented Mar 2, 2022

Thanks for the feedback and suggestions. Hopefully I have done the requested changes correctly. The HTML and test output looks good.

@jeanas jeanas removed the update needed Waiting for an update from the PR/issue creator label Mar 2, 2022
Comment thread pygments/lexers/berry.py Outdated
@jeanas
Copy link
Copy Markdown
Contributor

jeanas commented Mar 2, 2022

Thanks for the updates; there are still a few unresolved threads and one new (easy) one.

@jeanas
Copy link
Copy Markdown
Contributor

jeanas commented Mar 2, 2022

And two more:

  • Don't commit the macOS system file .DS_Store (I'll prepare a patch to make it ignored by Git),
  • Add Berry to doc/languages.rst.

Beormund added 2 commits March 2, 2022 23:05
1) versionadded changed to 2.12.0
2) def regex now handles names containing 'def'
3) Single line comment simplified
4) Changed Operator.Word -> Keyword
@Beormund
Copy link
Copy Markdown
Contributor Author

Beormund commented Mar 2, 2022

Added Berry to doc/languages.rst. I pushed a commit with the .DS_Store file deleted that I accidentally pushed in a previous commit.

Copy link
Copy Markdown
Contributor

@jeanas jeanas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. @birkenfeld Leaving on review right now in case you want to take a look at the updates.

Copy link
Copy Markdown
Member

@birkenfeld birkenfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just noted a little inconsistency where you use rf'...{_name}' in some places and explicit '...' + _name in others. But that's not a big deal.

@jeanas
Copy link
Copy Markdown
Contributor

jeanas commented Mar 6, 2022

Right. @Beormund, do you have the time to address that minor issue before we merge this?

@Beormund
Copy link
Copy Markdown
Contributor Author

Beormund commented Mar 7, 2022

Right. @Beormund, do you have the time to address that minor issue before we merge this?

Done!

@birkenfeld
Copy link
Copy Markdown
Member

Then thanks for the patience!

@birkenfeld birkenfeld merged commit 84549be into pygments:master Mar 7, 2022
@jeanas jeanas added this to the 2.12.0 milestone May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants