| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
declarations (#2208)
Something like
id id2("){ ... }");
is no longer wrongly recognized as a "function"
id id2(") {
...
}
");
As the difference in the tests shows, this has the unfortunate side
effect that we no longer highlight something like
int f(param="default");
as a function declaration, but it is hard to imagine another way to
fix this (cf. “most vexing parse” problem).
Fixes #2207
|
| | |
|
| |
| |
| |
| | |
\\\\|\\. is like \\. but causes catastrophic backtracking inside (...)* .
|
| |
| |
| |
| |
| |
| |
| | |
Fix problem reported at
https://lists.gnu.org/archive/html/lilypond-user-fr/2022-04/msg00075.html
Then update the autogenerated result.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Disable highlighting of unicode escape codes in python bytes literals,
as described in
https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals.
So escape codes of the form "\N{name}", "\uxxxx" and "\Uxxxxxxxx" will
no longer be highlighted within bytes literals. Add tests for escape
code highlighting in string and bytes literals.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This has come up a few times, and I see no good reason to catch
and report this error.
Fixes #2193
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Register new style
* Replace default_style with Token
#2184
* Remove default_style from styles
* Simplify register style code
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: andy <andy.yu2k@gmail.com>
Co-authored-by: Jean-Abou-Samra <jean@abou-samra.fr>
|
|
|
|
|
| |
* Added COMAL-80 language highlight.
Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
|
|
|
|
|
|
|
|
|
| |
StarOffice style is a theme used in the user interface and carries through to OpenOffice and LibreOffice, and the documentation.
Reference:
* [Color Config Entry](https://github.com/LibreOffice/core/blob/master/svtools/source/config/colorcfg.cxx#L447-L453)
* [Color Types](https://github.com/LibreOffice/core/blob/e4a57dcdabc9ae7d381025e008b90635c1b7b10c/include/tools/color.hxx#L448)
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
|
|
|
|
|
|
|
| |
* Add Name.Property token missing from docs
* Add Comment.PreprocFile token missing from docs
* Add Punctuation.Marker token to tokens dict
|
|
|
|
| |
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
|
| |
|
|
|
|
|
| |
DotNet lexer works with LibreOffice Basic, OpenOffice Basic, and StarOffice Basic.
* Update _mapping.py
|
|
|
| |
Co-authored-by: Fabian Huch <huch@in.tum.de>
|
|
|
|
|
|
| |
- Add new predeclared identifiers: `any` and `comparable`
- Add new operator for type parameters: `~` and `|`
Ref: https://go.dev/ref/spec
|
|
|
|
|
|
| |
the output
Fixes #2166
|
|
|
|
|
|
|
| |
* Remove backslash escape lexing in string literals.
(Don't know why I added those in the first place!)
* Lex strings in their entirety, not one character at a time.
* Treat unclosed string literals as errors.
|
|
|
|
| |
Related to #1905
|
| |
|
|\ |
|
| |
| |
| | |
F* actually allows for C-style `//` line comments to start anywhere in a line, not just at the beginning.
|
| |
| |
| |
| | |
Fixes #2162
|
| | |
|
| |
| |
| |
| | |
Fixes #2163
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
For the pygmentize command line, this pull request adds detection of true-color support on the terminal and makes that the default formatter. It looks up the COLORTERM environment variable having a value of truecolor or 24bit. If that is the case, it sets the default formatter to use the TerminalTrueColorFormatter.
The COLORTERM environment variable is a convention that has been adopted by some terminals for specifying true-color is supported.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
identifiers (#2158)
. is not an operator in Coq: in this specific usage, it is only meant to build a qualified name, so this rule really corresponds to a proper lexical rule in Coq
Unlike most languages, Coq has a large set of special words that are not reserved: they may still be used as identifiers. For example Prop is a special word, which currently gets highlighted as such in Equations.Prop.Equations, but it should be recognized as a regular name there. Because of how flexible the syntax of Coq is, it's not straightforward to disambiguate things with just a bunch of regexes, so we have to rely on heuristics. Skipping qualified names from being recognized as keywords is an easy win.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Switch from pkg_resources to importlib.metadata
importlib.metadata is a standard library replacement for
pkg_resources, available starting with Python 3.8. It is faster than
pkg_resources. This lets the plugin interface use it when available,
i.e. on Python 3.8 and later. On earlier Python, it uses the
importlib_metadata PyPI backport if available, and finally falls back
on pkg_resources. setup.cfg gains an extra called plugins, which can
allow a project to install "pygments[plugins]" in order to ensure that
plugins support is present even if installed with older Python
versions.
Timings for lexing an empty file with a lexer from a random plugin:
Before:
real 0m0,238s
user 0m0,210s
sys 0m0,029s
After:
real 0m0,141s
user 0m0,125s
sys 0m0,017s
Fixes #2116, #2126
|
| |
| |
| |
| | |
Fixes #2145
|
| |
| |
| |
| | |
These are irrelevant because the fnmatch module implementation already
uses functools.lru_cache.
|
| |
| |
| | |
It is quite common in my experience, along with 'TODO' and 'XXX'.
|
| |
| |
| | |
Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use a unified script, to reduce code duplication and in preparation
for doing a similar thing with styles and filters. The new script
also uses a bit more modern Python APIs (e.g., pathlib).
Unlike the previous scripts, it does not replace replace CRLF with LF
because Git should do that itself.
|
| |
| |
| |
| | |
pyflakes complained about an unused variable due to an oversight in
49c757cab5.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix most warnings in Sphinx build
Note that some invalid references are simply removed because the
lexers are all in the same section, so the link is already easy to
find and there is no need to repeat it over and over.
* fixup: Add orphan languages.rst to allow referencing
* Typos
|
| |
| |
| | |
Use `Name.Builtin`.
|
| |
| |
| |
| | |
Don't rely on the error message since 'missing 1 required positional
argument' can give false positives. Instead, use issubclass().
|
| |
| |
| | |
Co-authored-by: Chung Tai <chungtai456@gmail.com>
|