summaryrefslogtreecommitdiff
path: root/pygments/lexers/lilypond.py
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2023.Matthäus G. Chajdas2023-03-291-1/+1
|
* LilyPond: slightly improve lexing (#2283)Werner Lemberg2022-11-271-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle `--` and `__` as `Token.Punctuation` only if preceded by whitespace: ``` <whitespace> -- ==> hyphen (in lyrics mode) <whitespace> __ ==> extender line (in lyrics mode) -- ==> tenuto, neutral attachment (in music mode) __ ==> portato, down attachment (in music mode) ``` * Handle `-` followed by a number as `Token.Number` only if preceded by whitespace. This is purely heuristic, derived from the coding style shown in the LilyPond manuals. ``` <whitespace> -3 ==> integer (e.g., as a function argument) -3 ==> fingering instruction ``` * Add forgotten `\maxima` note duration. * Some legibility improvements by using verbose mode for regular expressions. * Some comment additions and fixes. * Update tests.
* all: style fixesGeorg Brandl2022-10-271-0/+1
|
* lilypond: fix Whitespace tokenGeorg Brandl2022-06-211-2/+2
|
* LilyPond: fix 'maybe-subproperties' state for properties containing dashes ↵Jean Abou-Samra2022-03-311-3/+3
| | | | (#2099)
* Rework URL information in lexers.Matthäus G. Chajdas2022-03-201-1/+2
| | | | | | | | This commit adds a new url field to a lexer, which can be used to link to the language website, instead of relying on having the link in either languages.rst or the docstring of the lexer. Additionally, it changes the languages.rst file to auto-generate the list of lexers from the actual source code, using the provided URL.
* LilyPond: fix wrong lexing of name containing builtin name (#2071)Jean Abou-Samra2022-03-071-1/+3
| | | | | Non-builtin names were scanned character by character, possibly causing recognition of a suffix as builtin.
* Happy new year.Georg Brandl2022-01-251-1/+1
|
* Fix typos (#2030)Kian-Meng Ang2022-01-181-1/+1
|
* Some LilyPond updates (#2001)Jean-Abou-Samra2021-12-281-35/+51
| | | | | | | | | | | | | - Add pitch language names to builtins. They are not highlighted specially in the default style, but can be in a custom style. - Refactor matching of builtins in order to avoid confusion between dim chord modifier and \dim dynamic command. - Support grob subproperties. - Add segno repeat type. - While at it, update builtins for latest version.
* Various small cleanups.Matthäus G. Chajdas2021-11-211-2/+1
|
* Add lexer and style for LilyPond (#1845)Jean-Abou-Samra2021-11-211-0/+181
* Add lexer and style for LilyPond 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. * Fixup: translators names have underscores * Fixup: avoid duplicate builtins * Fixup: update goldens * Fixup: typo * Fixup: add missing tokens to style * Fixup: update lexer comments * Fixup: Tentative style adjustments * Fixup: move test file to examplefiles/ * Fixup: miscellaneous fixes (to be finished) * Fixup: escape all braces * Fixup: use Text, not Whitespace * Fixup: fixes for lexing and style * Fixup: update goldens! * Fixup: also test alist assignments * Fixup: recognize escape sequences in strings * Fixup: use Comment.Single * Fixup: Whitespace, not Text! * Fixup: fix pitch parsing * Fixup: update comment * Fixup: remove redundant re.UNICODE