summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a few SystemVerilog type keywords (#1454)Chris Drake2020-05-221-7/+7
| | | | | | | | | | | | | | | | | * Fix a few SystemVerilog type keywords First, add a few missing type keywords: chandle, const, event, string, time, type, var, void These are most of the 'variable' types listed in 1800-2017 6.8 "Variable declarations". Currently, this 'Keyword.Type' is not taking effect because the lexer is finding these keywords in the 'Keyword' list above. Remove the double declaration so we get the more specific token type. * Change signed/unsigned to Keyword.Type This is what the C/C++ lexer does, so it seems legit.
* Make HttpLexer compatible with RFC 7230 (section 3.1.2). Specifically this ↵Joshua Huber2020-05-181-0/+14
| | | | addresses for the case where only a numeric HTTP status code is returned (eg. 200) and no textual reason phrase (eg. OK). Strictly according to RFC 7230, the whitespace just after the status code number is NOT optional, and in fact Tomcat 8.5 behaves this way, emiting status lines like "HTTP/1.1 200 \n" (note the whitespace after the 200). (#1432)
* Add a basic SystemVerilog unit test (#1452)Chris Drake2020-05-181-0/+207
| | | | | | | * Add a basic SystemVerilog unit test * Fix docstring Calling it a "complete fragment" didn't make much sense.
* Matlabsession line continuation (#1399)Bryan W. Weber2020-05-061-0/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add explicit line continuation for Matlab session Matlab lines can be explicitly continued with the ... syntax at the end of a line. In the Session lexer, this requires continuing to the next line to add more text. Otherwise, the next line is marked as output. * The ellipses in Matlab should be a Keyword The built-in Matlab syntax highlighter highlights ... with the same formatting as a keyword. Everything after that on the line should be a comment. * Update Matlab functions and keywords from R2018a * Fix many spaces in assignment formatted as string In command mode, MATLAB allows mutiple space separated arguments to a function which are interpreted as char arrays, and are formatted as Strings. This check was also catching cases where there were multiple spaces following an assignment or comparison operation and formatting the rest of the line as a string. Now, if an = or operator is found, the commandargs state is popped and control returns to the root state. * Add tests for MATLAB formatting
* Add lexer for YANG 1.1 (#1408)GRIBOK2020-04-132-0/+167
| | | | | | | | | | | | | | | | | | | * Add yang lexer for issue pygments/pygments#1407 * fix copyright statement * adjust examplefile for yang * fix to avoid duplicate code in lexer * add more testcases for yang lexer * simplify yang lexer * simplify default rule in yang lexer * change example yang file * add version to yang lexer
* a filter for math symbols (#1406)Gerwin Klein2020-04-131-0/+10
| | | | | | | | | * a filter for math symbols This filer replaces math symbols from e.g. LaTeX and Isabelle with corresponding unicode. It could be expanded to other math-heavy languages. * add "symbols" filter to basic tests
* Add execline lexer (#1393)Molly Miller2020-04-101-0/+37
| | | | | | | | | | | | | | | | | * Implement lexer for execline. This commit introduces a lexer for Laurent Bercot's execline scripting language (https://skarnet.org/software/execline) based on Pygments' existing bash lexer, with some minor adaptations for execline's variable naming rules. * Add versionadded note and website link to execline lexer. * Add execline to languages.rst and example execline script * Explicitly mark non-special characters in execline lexer as Text * Correct execline lexer version addded Co-authored-by: Molly Miller <sysvinit@users.noreply.github.com>
* A lexer for F*, an ML dialect for program verification (#1409)Denis Merigoux2020-04-101-0/+1416
| | | | | | | | | | | | | | | | | | | * A lexer for F*, an ML dialect for program verification * Fix treatment of infix applications, e.g. * Correct modifications * Better lexing * Added F* to the list of supported languages * Add example file * Bumped versionadded field * Added link to language Co-authored-by: Jonathan Protzenko <jonathan.protzenko@gmail.com>
* Add Typographic Number Theory lexer (#1414)Ken2020-04-101-0/+81
| | | | | | | | | * Add Typographic Number Theory lexer Originally tried to use RegexLexer, but the structure of TNT is too rigid for it to handle. Went with a direct parser instead. Co-authored-by: lonetwin <steve@lonetwin.net>
* Lean: update to Lean 3Bryan Gin-ge Chen2020-03-141-215/+207
| | | | From the fork at https://bitbucket.org/gebner/pygments-main/src/default/
* Fix tests on Windows.Matthäus G. Chajdas2020-03-011-2/+5
| | | | | | | This fixes three test failures on Windows: * Two due to incorrect handling of : (on Windows, multiple : can be part of a path.) * One due to newline differences
* Add ReasonML lexer. (#1386)Florian Hammerschmidt2020-02-291-0/+70
|
* Remove Python 2 compatibility (#1348)Georg Brandl2020-02-2912-55/+23
| | | | | | | | | | | * Remove Python 2 compatibility * remove 2/3 shims in pygments.util * update setup.py metadata * Remove unneeded object inheritance. * Remove unneeded future imports.
* Merge pull request #1385 from tomerv/python-fstringMatthäus G. Chajdas2020-02-291-0/+682
|\ | | | | Python f-strings: highlight expressions in curly braces
| * Python f-strings: highlight expressions in curly bracesTomer Vromen2020-02-041-0/+682
| | | | | | | | Fixes #1228
* | Add support for the MiniScript embedded scripting language.JoeStrout2020-02-201-0/+286
|/
* Adds the walrus operator to the Python3 lexer.Brett Slatkin2020-02-021-0/+25
| | | | | | | - The walrus operator, also known as assignment expressions, was introduced in Python 3.8 - Moves the Token.Operator matching root above Token.Punctuation so the walrus operator takes precedence - Includes a test to make sure this behavior doesn't regress since it's sensitive to the order of expressions - Fixes #1381
* Fix glob patterns when absolute paths are used (#1378)Catatonic2020-02-021-0/+45
| | | | | | * Fix glob patterns for directives like Include. * removing unnecessary escaping.
* Add lexer for LLVM's MIR format (#1361)Daniel Sanders2020-01-241-0/+32
| | | | | | | | | | | | | | | | | | MIR is a human readable serialization format that's used to represent LLVM's machine specific intermediate representation. It allows LLVM's developers to see the state of the compilation process at various points, as well as test individual pieces of the compiler. Our documentation for the format can be found at https://llvm.org/docs/MIRLangRef.html. Adding a lexer for this format will allow the LLVM documentation to contain syntax highlighted examples of LLVM-MIR. Two lexers are included in this change. 'llvm-mir' lexes the overall document format and delegates to 'llvm' and 'llvm-mir-body' as appropriate. 'llvm-mir-body' lexes the contents of the 'body:' attribute and can be used directly to syntax highlight code examples without including the document boilerplate. Since the 'llvm-mir' lexer delegates to the 'llvm' lexer at times, this change also adds the 'immarg' and 'willreturn' keywords to the 'llvm' lexer as these were missing.
* Correct lexing of Idris compiler directives (#1363)Molly Miller2020-01-191-0/+65
| | | | | | | | | | | * Fix lexing of Idris compiler pragmas. The regex for capturing Idris compiler pragmas did not separate the leading percent sign from the disjunction of compiler directives correctly, which caused issues such as "import" or "namespace" keywords to be mishighlighted, due to confusion with the "%import" and "%name" compiler pragmas. * Add unit test for Idris compiler directive lexing
* Add a PEG (Parsing Expression Grammar) lexer (#1336)Michael Wayne Goodman2020-01-161-0/+94
| | | | | * Add a PEG (Parsing Expression Grammar) lexer * Add PEG to doc/languages.rst and indicate version
* Merge branch 'master' into 671/upsuper/webidlMatthäus G. Chajdas2020-01-0715-20/+1167
|\ | | | | | | This allows us to resolve the merge conflict properly.
| * Add Sieve lexer (#1257)sblondon2020-01-041-0/+56
| | | | | | | | Add Sieve lexer
| * haskell: Fix highlighting of promoted type operators (#1347)Xia Li-yao2019-12-302-0/+34
| | | | | | | | | | | | | | * haskell: Fix highlighting of promoted type operators Fixes issue #527 Patch originally written by paamayim
| * Fix directives that have 0 argumentscatatonicprime2019-12-191-1/+15
| |
| * This commit adds a lexer for linux kernel logs as outputted by `dmesg`martijn@msi.localhost2019-12-091-0/+52
| | | | | | | | | | | | | | | | It supports output from `dmesg`, in that case it highlights based on keywords in the line It can also highlight `dmesg -x` output. In that case it uses the loglevels from the kernel to highlight the lines.
| * tests: remove special skip cases for random_input test caseGeorg Brandl2019-12-091-3/+0
| |
| * tests: split out "random input" test and make github tests verboseGeorg Brandl2019-12-091-2/+6
| |
| * Add keywords, define types and operators. Remove parameters. Delete test ↵jcmuel2019-12-082-169/+31
| | | | | | | | file with incompatible license.
| * Add Mosel lexer.German Riano2019-12-082-0/+172
| |
| * Fix valid_name regex for SLexerNikolay Korolev2019-12-071-0/+37
| | | | | | | | | | | | | | | | | | This fixes #1331 All modifications to regex: 1. Delete 2 useless non-capturing groups 2. Variables can not start with underscore (_) 3. Only letters, dot (.) and underscore (_) can go after first dot (.) in name 4. Name from only one symbol dot (.) is possible
| * Parse HTTP status-line even when reason-phrase not included. (#1322)Georg Brandl2019-12-061-0/+28
| |\ | | | | | | Parse HTTP status-line even when reason-phrase not included.
| | * Parse HTTP status-line even when reason-phrase not included.Jakub Roztocil2019-12-021-0/+28
| | | | | | | | | | | | Background: https://github.com/jakubroztocil/httpie/issues/811
| * | Add USD lexer (#1290)Georg Brandl2019-12-062-0/+723
| |\ \ | | |/ | |/| Add USD lexer
| | * Replaced Literal.Number with NumberColin Kennedy2019-12-051-33/+33
| | |
| | * Replaced Literal.String with StringColin Kennedy2019-12-051-21/+21
| | |
| | * Separated different pieces of text into whitespace and punctuation and textColin Kennedy2019-12-051-130/+130
| | |
| | * Fixed numeric testColin Kennedy2019-12-051-4/+4
| | |
| | * Added scientific notation support for USD numbersColin Kennedy2019-12-051-1/+9
| | |
| | * Replaced `Generic` with `Text` and `Punctuation` in test_usd.pyColin Kennedy2019-12-041-25/+25
| | |
| | * Removed module import from test_usd.pyColin Kennedy2019-12-041-312/+297
| | |
| | * Updated unittests to make sure outer-text-pair matches are not matched a ↵Colin Kennedy2019-12-041-2/+55
| | | | | | | | | | | | string types
| | * Fixed a typo in an existing docstringColin Kennedy2019-12-011-1/+1
| | |
| | * Added extra composition arcs and Prims to example.usdColin Kennedy2019-12-011-0/+61
| | |
| | * Renamed example.usda to example.usdColin Kennedy2019-12-011-0/+0
| | |
| | * Added missing docstringsColin Kennedy2019-12-011-23/+40
| | |
| | * Renamed unittest class to be more explicitColin Kennedy2019-12-011-1/+1
| | |
| | * Changed the special names of USD to the "Builtins" tokens, instead of ↵Colin Kennedy2019-12-011-1/+1
| | | | | | | | | | | | "Attribute" token
| | * Fixed issue where attributes were getting matched, even in USD metadataColin Kennedy2019-12-011-5/+5
| | |
| | * Added a separate test method for testing USD metadataColin Kennedy2019-11-301-1/+47
| | |