| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Added:
- support for space delimitor in every case, included multiline value
- check for odd number of backslash escapes
- "!" as comment start
- support for escape of spaces and separators
Dropped:
- undocumented ";" and "//" comment start
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 (...)* .
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
the output
Fixes #2166
|
|
|
|
| |
Fixes #2162
|
|
|
|
| |
Fixes #2145
|
|
|
| |
Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
|
|
|
| |
Co-authored-by: Chung Tai <chungtai456@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Initial commit for MCFunction Lexer + tests
* Apply suggestions from code review
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
* added docstring info + fix for run ... command
* remove string ending Error tokens
* not working - refactor in-progress
* fixed: generic property
* Update pygments/lexers/mcfunction.py
Co-authored-by: Georg Brandl <georg@python.org>
* apply some fixes from comments
* Update pygments/lexers/mcfunction.py
Co-authored-by: Georg Brandl <georg@python.org>
* spacing
* updated tests and applied more suggestions
* fixed comment regex, passes tests
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
Co-authored-by: Georg Brandl <georg@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/etc/shadow and /etc/group (#2112)
* add PasswdLexer and ShadowLexer for lexing /etc/passwd and /etc/shadow
* fix regex
* Update pygments/lexers/configs.py
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
* address review comments
* update _mapping.py
* Create united lexer UnixConfigLexer for config files using colon-separated values, typically used in Unix/Linux system config files.
* format docstring
* UnixConfigLexer: add whitespace detection
* add test snippets for UnixConfigLexer
* address review comment
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
Co-authored-by: Leistungsabfall <Leistungsabfall@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Merge unneeded state with it's parent rule
The `blockname` state did not have a `#pop` after it's only rule,
which caused outputting errors in #2094.
Instead of adding a `#pop`, I merged the `blockname` state with the
rule that uses it, to achieve the exact same lexing logic, but without
another state in the lexer.
* Add test for #2094
* Regenerate tokens for previous tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Lex identifiers after `case` as constants
Add a state for marking identifiers preceded by a `case` keyword as
constants.
Additionally, refactor the `label` rule to no longer permit a `case`
keyword before a label.
Consequentially, identifiers after a `case` keyword (like `foo` in
`case foo:`) are no longer wrongly lexed as `Name.Label`, but as
`Name.Constant`.
In addition, this fixes #2076, as multiple `case` keywords in one
line are lexed the same.
* Add test for multiple `case` keywords in one line
* Fix existing tests
* Lex `::` as Operator and not Name.Constant
After a `case`, when lexing a namespaced name, like `foo::bar`, lex the
namespace operator `::` as Operator, and not Name.Constant.
* Regenerate tokens
|
|
|
|
|
|
| |
These lexers have re.DOTALL in their flags, so r"(.|\n)" is equivalent
to r".", except with catastrophic backtracking properties.
Closes #2068
|
|\ |
|
| |
| |
| |
| | |
fix pi8027/algebra-tactics-paper#3
|
| | |
|
|\ \
| | |
| | |
| | | |
of https://github.com/blu-base/pygments into blu-base-lexers_ijkl
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| |
| |
| |
| |
| | |
Highlighting as Keyword.Declaration is consistent with the
RacketLexer.
|
| |
| |
| |
| |
| |
| |
| | |
This enriches the space of recognized builtins.
Note that this also fixes the space after a builtin being included in
the token.
|
| |
| |
| |
| |
| | |
Many number literals were not recognized previously, such as
fractions, infinities, hex and complex literals.
|
| |
| |
| |
| |
| | |
Move string parsing to a dedicated state so it can recognize string escapes.
Add support for various kinds of escapes.
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Java: fix lexing of 'record' soft keyword
Refactor the Java lexer to treat `record` as a soft keyword.
Previously, the lexer assumed record is a reserved word, even though
it is a soft keyword which can be used as a variable name.
This refactor lexes record as a keyword only if it appears at the
beggining of the line, with some potential other keywords like public
and private preceding it.
* Remove repetition in capture group
* Update test output
|
|\
| |
| |
| | |
https://github.com/blu-base/pygments into blu-base-lexers_gh
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lexers: add Elpi
* test: elpi
* Fix copyright
* address code review
|
|\ \
| |/
|/|
| | |
blu-base-lexers_ef
|
| | |
|
|\ \
| | |
| | |
| | | |
blu-base-lexers_de
|
| | | |
|
| | | |
|
| |/
|/| |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit c339afa51bac82515e90da90df3d2a428c612e20
Author: Matthäus G. Chajdas <dev@anteru.net>
Date: Sat Nov 6 22:10:22 2021 +0100
Update tests.
commit b60cf209ad93bc9176581f4a77ece58da4e1212a
Merge: 7f000b4e cf7a978a
Author: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
Date: Sat Nov 6 17:35:34 2021 +0100
Merge branch 'master' into feature-terraform-heredoc
commit 7f000b4ef8930817f4c1249c242d95a9c191f4eb
Author: Chris Rose <offline@offby1.net>
Date: Mon Oct 11 07:47:36 2021 -0700
Eliminate pathological regex case
I updated the terraform lexer to use the ExtendedRegexLexer and to
handle heredocs with a callback, instead of with a regexp for the whole
shebang.
commit 0a1fa1b139b9249f210cd9450dafa8a1ee1715f8
Author: Chris Rose <offline@offby1.net>
Date: Sat Oct 9 20:16:51 2021 -0700
Add support for the `set` type in HCL
commit 18ad21300bb890fc9014a66c7ba2c195429b4d16
Author: Chris Rose <offline@offby1.net>
Date: Sat Oct 9 19:14:27 2021 -0700
Support HCL's heredoc syntax
Fixes #1909
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Whitespace token modernization - ambient lexer
* Whitespace token modernization - ampl lexer
* Whitespace token modernization - apdlexer lexer
* Whitespace token modernization - apl lexer
* Whitespace token modernization - adl lexer
* Whitespace token modernization - arrow lexer
* Whitespace token modernization - asm lexer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Modernize Whitespace token: basic lexer
* Modernize Whitespace token: bibtex lexer
* Modernize Whitespace token: boa lexer
* Modernize Whitespace token: capnproto lexer + new example
* Modernize Whitespace token: cddl lexer
* Modernize Whitespace token: chapel lexer
* Modernize Whitespace token: c_like lexer
* Modernize Whitespace token: configs lexer
* Modernize Whitespace token: console lexer
* Modernize Whitespace token: crystal lexer
* Modernize Whitespace token: csound lexer
* Modernize Whitespace token: css lexer
* Revert a change in basic lexer
|