Skip to content
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 and style for LilyPond #1845

Merged
merged 22 commits into from Nov 21, 2021
Merged

Add lexer and style for LilyPond #1845

merged 22 commits into from Nov 21, 2021

Conversation

jeanas
Copy link
Contributor

@jeanas jeanas commented Jun 23, 2021

GNU LilyPond is a text-based music typesetter. Because its concepts
are completely different from programming languages, this adds
a special-purpose to highlight the special tokens.

The SchemeLexer is expanded to gain the ability of detecting when
one expression stops. LilyPondLexer subclasses SchemeLexer.

Builtins (the most important part) are generated with a script
put in external/ (as was already done for Lasso).

As part of this change, the CPSALexer is made no longer to
inherit from SchemeLexer. The inheritance was unused anyway.

pygments/lexers/_lilypond_builtins.py Show resolved Hide resolved
pygments/lexers/lilypond.py Outdated Show resolved Hide resolved
@jeanas jeanas marked this pull request as draft July 6, 2021 18:37
jeanas added 12 commits July 6, 2021 23:15
GNU LilyPond is a text-based music typesetter. Because its concepts
are completely different from programming languages, this adds
a special-purpose to highlight the special tokens.

The SchemeLexer is expanded to gain the ability of detecting when
one expression stops. LilyPondLexer subclasses SchemeLexer.

Builtins (the most important part) are generated with a script
put in external/ (as was already done for Lasso).

As part of this change, the CPSALexer is made no longer to
inherit from SchemeLexer. The inheritance was unused anyway.
@jeanas
Copy link
Contributor Author

jeanas commented Jul 8, 2021

This is now ready for review.

@jeanas jeanas marked this pull request as ready for review July 8, 2021 16:08
@jeanas
Copy link
Contributor Author

jeanas commented Jul 24, 2021

Is there anything I can do to help this PR move forward?

@Anteru
Copy link
Collaborator

Anteru commented Jul 24, 2021

No, I just need to find some time to review it :/

@Anteru Anteru self-assigned this Jul 24, 2021
@Anteru Anteru added the A-lexing area: changes to individual lexers label Jul 24, 2021
@jeanas
Copy link
Contributor Author

jeanas commented Sep 21, 2021

@Anteru Gentle ping?

@Anteru
Copy link
Collaborator

Anteru commented Sep 27, 2021

It's on my radar, just busy with other stuff right now -- sorry this is taking that long :(

@Anteru Anteru merged commit d016802 into pygments:master Nov 21, 2021
@Anteru
Copy link
Collaborator

Anteru commented Nov 21, 2021

Finally got around to this. Merged, thanks!

@jeanas
Copy link
Contributor Author

jeanas commented Nov 21, 2021

Thank you!!

@jeanas
Copy link
Contributor Author

jeanas commented Nov 21, 2021

@Anteru Unfortunately it seems that this PR has broken some checks that have been added in the meantime. I'm on it and will submit a PR very soon.

@Anteru
Copy link
Collaborator

Anteru commented Nov 21, 2021

I think 2d831c1 fixes the last issues.

@jeanas
Copy link
Contributor Author

jeanas commented Nov 21, 2021

Yeah, you were faster than me :-) Thanks!

@jeanas
Copy link
Contributor Author

jeanas commented Nov 21, 2021

Ok, I still see two quirks:

  • my Sphinx complains about the "LilyPond" target being duplicated in languages.rst (easy to fix),
  • I see that a style gallery was added in the meantime. The LilyPond-specific style is not relevant there and doesn't look very attractive :-) I'm not sure what's the best fix: should I just add a check for style != 'lilypond' in conf.py? Should I introduce a style_gallery_exclude attribute?

@jeanas jeanas deleted the lilypond branch November 21, 2021 19:18
@Anteru
Copy link
Collaborator

Anteru commented Nov 21, 2021

Oh right, the style gallery -- good catch. I think an "exclude" attribute would be indeed the best solution. Could you please prepare a PR for both issues?

@jeanas
Copy link
Contributor Author

jeanas commented Nov 21, 2021

Will do.

This was referenced Nov 21, 2021
@Anteru Anteru added this to the 2.11.0 milestone Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lexing area: changes to individual lexers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants