lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pygment regex question


From: Werner LEMBERG
Subject: pygment regex question
Date: Fri, 25 Nov 2022 13:23:59 +0000 (UTC)

Looking into `lilypond.py` (in `pygments.zip`), I wonder what exactly
this regex does:

```
# Integer, or duration with optional augmentation dots. We have no
# way to distinguish these, so we highlight them all as numbers.
(r"-?(\d+|\\longa|\\breve)\.*", Token.Number),
```

What is `-?` good for?  Note that at the time this regex is active,
numbers are taken care of.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]