| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
There is no 'wo' keyword.
This was probably supposed to be 'wor', short for "wired OR".
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add lexer for Devicetree language
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
* Devicetree lexer: fix random input test error
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
* Devicetree lexer: fix example file reference
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
* Devicetree lexer: Reduce example file size
Also add some missing language elements
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The original implementation was missing some of the more arcane features
such as underbars, the character 's' for signed/unsigned, support for
spaces before/after the base specifier, capital letter base specifiers
(ie 'B 'D 'H), and the 4-state 'xXzZ?' characters.
For regular integers, the 'l' and 'L' suffixes are not valid.
That is, unlike C, in Verilog '42L' is not a valid int literal.
Create a new test that exercises most of the interesting kinds of
SystemVerilog numbers.
This fixes a couple minor issues with what type of number the lexer
returns. For example, Numbers like '42' used to return Integer.Hex,
but now return Integer.Decimal.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* add support for .tid files (TiddlyWiki5)
* add lexers/_mapping.py
* markup.py: change versionadded of TiddlyWiki5Lexer to 2.7
* markup.py, TiddlyWiki5Lexer: use non-greedy matcher for table headers, footers, captions and classes
* markup.py, TiddlyWiki5Lexer: make timestamps of type Number.Integer
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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.
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* General improvement to the C/C++ lexer
* Add missing C11 keywords
Add '_Imaginary', '_Static_assert', '_Atomic' keywords.
* Highlight C11 std atomic types (#906)
Add support for C11 atomic types `atomic_*`.
* Extended character literals prefixes for C/C++
Add support for `u'a'`, `U'a'` (C++11, C11), and `u8'a'` (C++17, C2x).
[Reference](https://en.cppreference.com/w/cpp/language/character_literal).
[Reference](https://en.cppreference.com/w/c/language/character_constant).
* Fix bad floating point highlighting in C lexer
Fix bad highlighting for `5.`, where `.` was not highlighted.
* Fix hex floating literal highlighting in C
Hexadecimal floating point literals needs an exponent (`0x5p8`). Before this commit, event floating-point literals without an exponent were accepted (e.g. `0x5.5`).
* Support '$' in identifiers, C/C++
Some old C/C++ compilers have supported `$` (dollar sign) in identifiers, and some news continue to support this for legacy reasons. That is, some codes may use them, and it is therefore preferable to color them correctly.
* Cleaning and fixing some bugs in C/C++ lexer
- Add '_Pragma' keyword
- Recognize the identifier following 'typename' as Name.Class
- Do not tokenize 'class' or 'struct' following 'enum' as Name.Class, but instead as Keyword (C++ lexer)
- Move some C++ keywords to the generic lexer (`alignas`, `alignof`, etc...)
- Add some C keywords (`noreturn`, `imaginary`, `complex`)
- And others things...
* Fix building errors in C/C++ lexer
* Fix bug in C/C++
Now `class`, `struct`, `enum`, `union`, etc... can be used alone. Previously, the lexer do not recognizes them if they are not followed by an identifier. This regression was introduced in https://github.com/pygments/pygments/pull/1350/commits/013bf6af2777f6ba444e2c8e3a8ca3ad1bb1e674 by me.
* Reuse old states names for C/C++
Some lexers depends on the old states names (e.g. `classname` state) to works. This commit, reintroduce these old names.
* Improve C/C++ lexer documentation
* Correct english errors in C lexer documentation
* Cleaning and Unicode literals for C
* Move Unicode literals from C++ to generic C
* Remove useless 'classname' state in ECLexer
* Revert "Remove useless 'classname' state in ECLexer"
This reverts commit 89a0c138fbcc70883d8035b0585b7e94e49f73cc.
* Revert "Revert "Remove useless 'classname' state in ECLexer""
This reverts commit 2d4734308a813abec6a17ea7fa6eb3a0b6f57939.
* Add support for UCNs in C and C++
* Apply correction from #1162
Solves #1162
* Correctly highlights negatives numbers in C++
* Revert some changes from 8fe8ed6
* Add unicode suffixes to C++ raw string literals
* Solves #1166
* Fix previous regression in C like lexer
* Fix invalid regex in C like lexer
* Fix #1396 and now are identifiers support UCNs in C and C++ lexer
* Update AUTHORS
* Add missing Python raw string prefix
Co-authored-by: Hubert Gruniaux <42495291+HubertGruniaux@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| | |
In the linux source code a lot of files are named Kconfig.debug and
there are also other derivatives like Kconfig.x86 or Kconfig-nommu
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
|
| |
| |
| |
| | |
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)
|
| | |
|
| |
| |
| |
| | |
fixes #1444
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
The escaped identifiers start with a backslash, end with whitespace,
and can include any character that is not whitespace.
See IEEE 1364-2005 §3.7.1 and IEEE 1800-2017 §5.6.1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add SystemVerilog (IEEE 1800-2012) keywords
See Table 22-6 -- IEEE 1800-2012 additional reserved keywords
* implements
* interconnect
* nettype
* soft
* Add several SystemVerilog system tasks
See IEEE 1800-2017 Chapter 20:
"Utility system tasks and system functions".
20.2 : $exit $stop
20.3 : $realtime $stime $time
20.4 : $printtimescale $timeformat
20.5 : $bitstoreal $realtobits $bitstoshortreal $shortrealtobits $itor $rtoi
$signed $unsigned $cast
20.6 : $bits $isunbounded $typename
20.7 : $unpacked_dimensions $dimensions $left $right $low $high $increment $size
20.8 : $clog2 $asin $ln $acos $log10 $atan $exp $atan2 $sqrt $hypot $pow $sinh
$floor $cosh $ceil $tanh $sin $asinh $cos $acosh $tan $atanh
20.9 : $countbits $countones $onehot $onehot0 $isunknown
20.10: $fatal $error $warning $info
20.12: $asserton $assertoff $assertkill $assertcontrol $assertpasson $assertpassoff
$assertfailon $assertfailoff $assertnonvacuouson $assertvacuousoff
20.13: $sampled $rose $fell $stable $changed $past $past_gclk $rose_gclk $fell_gclk
$stable_gclk $changed_gclk $future_gclk $rising_gclk $falling_gclk
$steady_gclk $changing_gclk
20.14: $coverage_control $coverage_get_max $coverage_get $coverage_merge
$coverage_save $get_coverage $set_coverage_db_name $load_coverage_db
20.15: $dist_chi_square $dist_erlang $dist_exponential $dist_normal
$dist_poisson $dist_t $dist_uniform
20.16: $q_initialize $q_add $q_remove $q_full $q_exam
20.17: $async$and$array $async$and$plane $async$nand$array $async$nand$plane
$async$or$array $async$or$plane $async$nor$array $async$nor$plane
$sync$and$array $sync$and$plane $sync$nand$array $sync$nand$plane
$sync$or$array $sync$or$plane $sync$nor$array $sync$nor$plane
20.18: $system
Also:
* Replace '$test' '$plusargs' with '$test$plusargs'.
* Add some comments for the remaining system tasks
* Reorganize tasks into sections (w/ comments), according to spec
Rather than just alphabetize this giant list,
separate them into the sections by spec,
then alphabetize within those sections.
Hopefully, this will make it easier to extend in the future.
* Fix typo: change 'wo' to 'wor'
There is no 'wo' keyword. This was probably supposed to be
'wor', short for "wired OR".
|
|
|
|
| |
fixes #1433
|
|
|
|
|
| |
* Alphabetise all keywords in yang lexer
* fix typo in keyword of yang lexer
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* 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
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>
|
|
|
|
|
|
|
|
|
| |
* Add the import keyword to the list of keywords
* Update the website link at the top of the class
While the old link still redirects to the new one, it's better to just have the
new link (we've been using this link for a few years now so it's not actually
that new, but still).
|
| |
|
|
|
|
| |
From the fork at https://bitbucket.org/gebner/pygments-main/src/default/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SQL:2011 introduced support for temporal databases[1] via new keywords to
create and manage temporal tables. This patchset adds these new keywords to
the sql lexer.
One concrete example of these feature is the temporal tables support in
MariaDB[2]. As evident from the code listing on that page, the syntax
highlighting for these keywords is not as widespread as expected (I wouldn't
be surprised if code listing on that page ultimately use pygments for syntax
highlighting !)
[1] https://en.wikipedia.org/wiki/SQL:2011
[2] https://mariadb.com/kb/en/temporal-data-tables/
|
|
|
|
|
| |
Put it into a new category, Keyword.Removed, so it's not completely
gone.
|
|\
| |
| |
| | |
https://github.com/kubo39/pygments into kubo39-dlang-remove-typedef-from-keywords
|
| |
| |
| |
| | |
ref: https://dlang.org/deprecate.html#typedef
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Remove Python 2 compatibility
* remove 2/3 shims in pygments.util
* update setup.py metadata
* Remove unneeded object inheritance.
* Remove unneeded future imports.
|
|\ \
| | |
| | | |
Python f-strings: highlight expressions in curly braces
|
| | |
| | |
| | |
| | | |
Fixes #1228
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add support for the MiniScript embedded scripting language.
|
| | | | |
|
|/ / / |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
* Support for *.eex files in ElixirLexer
* update lexer mapping
|
| | |
| | |
| | |
| | | |
Update Csound built-ins for v6.14.0
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
alanhamlett/regex-search-does-not-work-with-multiline
Multiline flag does not work with re.match
|
| |/ / |
|