| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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>
|
|
|
|
| |
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
|
| |
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #2162
|
|
|
|
| |
Fixes #2163
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Fixes #2145
|
|
|
| |
Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
|
|
|
| |
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>
|
|
|
|
|
| |
* Ada 2022: adding support for at sign
* Ada 2022: adding support for square brackets
* Ada 2022: introducing test for new syntactic additions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
| |
Adds recognition of 'def'/'type^'/'type~' keywords and adds some
missing characters to the regexes for identifiers and punctuation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix #632.
The doc string indicates that the linenos table is wrapped in <div class="highlight">,
but the actual implementation puts the <div> inside the table cell containing the code.
This seems to cause issues as explained in #632, and given it doesn't match the
documentation, this PR restores the original behavior.
* Fix sample code in comment.
* Update CHANGES.
* Refactor the wrapping logic.
Instead of calling _wrap_div() at the end of wrap(), _wrap_div()
is now called after wrap/_wrap_tablinelinenos. This yields the
desired behavior but removes the custom <div> generation code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nested type names were being highlighted as if they were function names.
Now a phrase like `Spec.Process.run` is highlighted properly as:
- `Name.Class`
- `Punctuation`
- `Name.Class`
- `Punctuation`
- `Name.Function`
Instead of wrongly highlighted as it was before this commit:
- `Name.Class`
- `Punctuation`
- `Name.Function`
- `Punctuation`
- `Name.Function`
|
|
|
|
|
|
| |
Now the Savi lexer can tokenize string interpolation inside strings,
which is a new feature added to Savi since the last time this
lexer was updated.
|
|
|
|
|
|
|
| |
Prior to this change, every underscore/private identifier
in Savi code was being highlighted as if it were a class name.
After this change, only those whose first letter is uppercase
will be highlighted as such, which is the correct behavior.
|
|
|
|
|
| |
The previous example shows the old usage of the testing framework.
Now the example reflects the current usage/API of that framework.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add Macaulay2 lexer
* Update symbols for Macaulay2 1.18
* Match whitespace characters in Macaulay2 lexer
* Add states for strings/comments in Macaulay2 lexer
* Update Macaulay2 lexer tests for string/comment edge cases
* Improve comment and string matching in Macaulay2 lexer
Instead of matching each character one at a time, we match all
characters without special meaning together.
* Update Macaulay2 test output
* Update Macaulay2 lexer symbols for 1.19 release
* Move "auto-generated" comment in Macaulay2 lexer down a few lines
* Fix underline length in Macaulay2 lexer docstring
* Add url field for Macaulay2 lexer
* Bump copyright year for Macaulay2 lexer
|
|
|
|
| |
(#2099)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uxn is a virtual machine which represents a personal computing
playground, and is described here:
https://100r.co/site/uxn.html
Uxntal assembly language is described here:
https://wiki.xxiivv.com/site/uxntal.html
The demo code piano.tal is used with permission.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
Non-builtin names were scanned character by character, possibly
causing recognition of a suffix as builtin.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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
|