| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* NF: adding an example of use of simple filter
@simplefilter is great, but also not very intuitive. Indeeds, the syntax seems
to indicate that you define a function with four arguments while in reality you
define a class whose constructor takes arbitrary keyword arguments. I believe in
this case an example to show how to instantiate this filter is really necessary.
Regarding simplefilter, I also believe that it could be improved in two simple
ways:
* accepting any method which takes lexer and stream as a filter. That would be
sufficient as long as there is no option
* the @simplefilter decorator could deal with `self` so that the user do not
have to add it themselves. Probably not worth doing it no, as it would break
compatibility with current version, but would be even simpler to use
* NF: clarifying get_..._options
get_bool_opt's documentation seems to indicate that the key is interpreted as a
Boolean. While a quick look at the code shows clearly that the value associated
to the key is what is interpreted as a Boolean. I hope I made the code clearer
to any people who know python by indicating that it is essentially `.get` but
with extra features
* NF: clarifying Filter
`filter` has already a specific behavior in general python, or for any people
used to functional programing (and even if some dom processor). So indicating
that a filter is not something that remove some tokens seems really useful to
try to explain what is going on.
* NF: adding details regarding states in lexer
I found the state explanation confusing. I do know what a state machine
is. However, reading the code, I first thought that there were two distinct
variables:
* the current state
* the stack
that are somehow related but distinct. Explaining that the current state is the
top of the stack was lacking in my opinion. That also help explain #push. In
particular that if you define in state "s" an operation whose new state is
"#push", the behavior can be quite different than if the new state was "s".
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Create BDD.py
Initialize the lexer file of BDD
Add keywords of BDD
* Update the 'RegexLexer'
* Edit and test
* Update BDD.py
* Update BDD.py
* Update the BddLexer file
* Update the BddLexer of root tokens
* edit bdd
Add regular expression for tokens
* edit bdd
Add regular expression for tokens
* add .gitignore
* updata bdd.lexer
* Delete bdd.py
* Update the Keywords, Numbers, Punctuation token
* bdd.py
Assign different colors to keywords, punctuation, numbers, and variables.
* Update the BddLexer file
* Update bdd.py
Fix the file name.
* Add the detection for '@'
Co-Authored-By: OMGJL <8707895+OMGJL@users.noreply.github.com>
* Update bdd.py
Add detection of double quotes.
Co-Authored-By: OMGJL <8707895+OMGJL@users.noreply.github.com>
* Fix the double quotes
* fix the quote recognition
* add comments
* update the root dir
* add bdd test cases
* Delete .DS_Store
* Delete .DS_Store
* Delete .DS_Store
* remove DS file
* restore the gitignore file
* update the bdd lexer
* update the bdd lexer
* update the whitespace highlight
* update the whitespace highlight
* refactor the bdd.py
* update the punctuation
* update the punctuation
* update bdd token
Change "." to the "\S+",
Which reduce the test output file size.
Co-Authored-By: OMGJL <8707895+OMGJL@users.noreply.github.com>
* Update bdd.py
Reduce the new token for each space
Co-authored-by: Hongyuan Yan <hongyuan.yan@student.adelaide.edu.au>
Co-authored-by: OMGJL <lzhsjunkmail@gmail.com>
Co-authored-by: Hongyuan Yan <54675432+kirito330824@users.noreply.github.com>
Co-authored-by: Jessie2110 <71688609+Jessie2110@users.noreply.github.com>
Co-authored-by: Jessie2110 <wuqiong2110@gmail.com>
Co-authored-by: OMGJL <8707895+OMGJL@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* LilyPond: update builtins to 2.23.4
* Doc: deduplicate LilyPond in language lists
* Doc: exclude lilypond style from gallery
Because it's specific to LilyPond code and doesn't give good results
on Python code.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add lexer for the Savi language.
* Updates based on review comments.
* Prefer Text.Whitespace token over Text token for whitespace.
* Updates to Savi lexer based on changes to Rouge Savi lexer.
* Add versionadded identifier to Savi lexer.
|
| | |
|
|\ \
| | |
| | | |
Sort styles in gallery by background luminance
|
| | | |
|
|/ / |
|
| |
| |
| | |
Part of #1718.
|
| |
| |
| |
| |
| | |
Was removed in 5a987b8af8dcbddcbd5cade37adebed5b5dd99f1
but that introduced unintended changes.
|
| |
| |
| |
| | |
Co-authored-by: Georg Brandl <georg@python.org>
|
| | |
|
| | |
|
| |
| |
| | |
Add documentation for the -N, -g, -s and --json command line options.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Added Smithy Lexer (#1878)
* Added Smithy Lexer
* Added Smithy Lexer auhtor
* Documented Smithy as a supported language
* Added Smithy test file and output
* Updated Smithy Lexer
* Added Standard file heading with copyright and license
* Used `words` method for optimization, instead of bare regex
* Specified whitespace punctuation in root
* Updated aliases to only contain lowercase names to pass `test_basic_api` tests
* Updated regexes lightly to fit regexlint rules (removing duplicate characters in group `-`)
* Fixed regexes with errors in regexlint rules (Escaping brackets, gaps in capture groups)
* Ran mapping script to fix build check
* Ran mapping to update after changing aliases in previous commit
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add support for JSLT
JSLT is an open-source JSON query and transformation language, inspired
by jq, XPath, and XQuery: https://github.com/schibsted/jslt.
* fixup! Add support for JSLT
* fixup! Add support for JSLT
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Support both single carets for syntax errors (Python 2 and 3)
and fine-grained error locations with several carets (Python 3.11+).
Previously, the carets were highlighted as operators. This uses
a new token, Token.Punctuation.Marker. For now, no style supports
it specifically. In the future, styles might start differentiating
it from Token.Punctuation.
[Closes #1850.]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* add Procfile Lexer
* add unit tests for ProcfileLexer
* add Procfile lexer author
* Document Procfile as supported language
* add Procfile.output file
* merge Profile files; update output file
* Add versionadded info
* Fix typo (processus -> processes)
* detect Integer only
* split Text from Whitespace
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add a Meson language lexer
* update the mappings
* Add meson to the list of supported languages
* Add a meson.build example file
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Support for OMG IDL
Lexer for [Object Management Group Interface Definition Language](https://www.omg.org/spec/IDL/About-IDL/).
* Allow Whitespace Before include in C Preprocessor
It wasn't highlighting the included filename the same as if there was no
space before the include, but now it is.
* Update omg-idl Tests to Latest Requirements
* Update omg-idl versionadded to 2.9
Since I just realized this missed the 2.8 release.
* Add Missing Operators to omg-idl
|
| |
| |
| |
| |
| | |
* uniformize aliases order
* LighttpdConfLexer: add lighttpd.conf filename
|
| |
| |
| |
| | |
Reference: #1571
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add NestedText lexer
* Add NestedText to list of supported languages
* Add some more test cases
* Update tests.
|
| |
| |
| | |
Command was not including the line numbers, missing `linenos=1` option.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add CDDL lexer (thanks to Fabian Neumann)
* Add CDDL to mappings
* Fix inline flag in CDDL regex
* Update AUTHORS
* Fix explosive backtracking
* Comment invalid CDDL syntax for automated tests
* Update following Georg Brandl's review
* Update tests for CDDL to new framework
* Pylint pass
* Update links to CDDL RFC
* Update copyright header
* Solve regexlint issues in CDDL parser
* Add link to CDDL in documentation
|
| |
| |
| |
| |
| |
| |
| | |
Imported from:
https://github.com/nikeee/pygments-lexer-graphviz
See:
https://github.com/pygments/pygments/issues/731
|
| | |
|
| |
| |
| |
| | |
docs to point to both snippets and examplefiles.
|
| |
| |
| | |
Co-authored-by: Georg Brandl <georg@python.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
pyupgrade is a tool to automatically upgrade syntax for newer versions
of the Python language.
The project has been Python 3 only since
35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups:
- Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all
source files as utf-8 by default.
- Replace IOError/EnvironmentError with OSError. Python 3 unified these
exceptions. The old names are aliases only.
- Use the Python 3 shorter super() syntax.
- Remove "utf8" argument form encode/decode. In Python 3, this value is
the default.
- Remove "r" from open() calls. In Python 3, this value is the default.
- Remove u prefix from Unicode strings. In Python 3, all strings are
Unicode.
- Replace io.open() with builtin open(). In Python 3, these functions
are functionally equivalent.
Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
|
| | |
|
| |
| |
| | |
see #1660
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
* all: remove "u" string prefix
* util: remove unirange
Since Python 3.3, all builds are wide unicode compatible.
* unistring: remove support for narrow-unicode builds
which stopped being relevant with Python 3.3
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
closes #1518
|