| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
... which is not equivalent in Unicode mode
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Overhaul the MySQL lexer
Fixes #975, #1063, #1453
Changes include:
Documentation
-------------
* Note in the lexer docstring that Oracle MySQL is the target syntax.
MariaDB syntax is not a target (though there is significant overlap).
Unit tests
----------
* Add 140 unit tests for MySQL.
Literals
--------
* Hexadecimal/binary/date/time/timestamp literals are supported.
* Integer mantissas are supported for scientific notation.
* In-string escapes are now tokenized properly.
* Support the "unknown" constant.
Comments
--------
* Optimizer hints are now supported, and keywords are
recognized and tokenized as preprocessor instructions.
* Remove nested multi-line comment support, which is no
longer supported in MySQL.
Variables
---------
* Support the '@' prefix for variable names.
* Lift restrictions on characters in unquoted variable names.
(MySQL does not impose a restriction on lead characters.)
* Support single/double/backtick-quoted variable names, including escapes.
* Support the '@@' prefix for system variable names.
* Support '?' as a variable so people can demonstrate prepared statements.
Keywords
--------
* Keyword / data type / function are now in a separate, auto-updating file.
* Support 25 additional data types (including spatial and JSON types).
* Support 460 additional MySQL keywords.
* Support 372 MySQL functions.
Explicit function support resolves a bug that causes non-function
items to be treated as functions simply because they have a trailing
opening parenthesis.
* Support exceptions for the 'SET' keyword, which is both a datatype and
a keyword depending on context.
Schema object names
-------------------
* Support Unicode in MySQL schema object names.
* Support parsing of backtick-quoted schema object name escapes.
(Escapes do not produce a distinct token type at this time.)
Operators
---------
* Remove non-operator characters from the list of operators.
* Remove non-punctuation characters from the list of punctuation.
* Cleanup items based on feedback
* Remove an unnecessary optional newline lookahead for single-line comments
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove Python 2 compatibility
* remove 2/3 shims in pygments.util
* update setup.py metadata
* Remove unneeded object inheritance.
* Remove unneeded future imports.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Run the pyupgrade tool across the project to use modern language
features.
- Use set literals
- Use dict comprehension
- Remove unnecessary numeric indexes in format string
- Remove unnecessary extra parentheses
|
| |
|
|
|
|
| |
Updated CHANGES as well, and moved the LLVM PR to the right list.
|
|\
| |
| |
| | |
Added analyse_text() for SQL
|
| | |
|
| |\
| | |
| | |
| | | |
Add lexer for Transact-SQL
|
| | | |
|
| | |
| | |
| | |
| | | |
#578. Now it even works in combination with re.DOTALL.
|
| | |
| | |
| | |
| | | |
and "1.e2."
|
| | |
| | |
| | |
| | | |
without a newline at the end.
|
| | |
| | |
| | |
| | | |
for Transact-SQL.
|
| | | |
|
| |/ |
|
| |\ |
|
| | |
| | |
| | |
| | | |
Also closes issue #886.
|
| |/ |
|
| | |
|
| |
|
|\ |
|
| | |
|
| | |
|
|/
|
|
|
|
| |
So we return instead. Fix needed for Python 3.7.
Fixes https://bitbucket.org/birkenfeld/pygments-main/issues/1457
|
| |
|
|
This introduces support for some missing features to the Handlebars lexer:
Partials and path segments. Partials mostly appeared to work before, but the
`>` in `{{> ... }}` would appear as a syntax error, as could other
components of the partial. This change introduces support for:
* Standard partials: `{{> partialName}}`
* Partials with parameters: `{{> partialName varname="value"}}`
* Ddynamic partials: `{{> (partialFunc)}}`
* Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}`
* Partial blocks: `{{> @partial-block}}`
* Inline partials: `{{#*inline}}..{{/inline}}`
It also introduces support for path segments, which can reference content in
the current context or in a parent context. For instance, `this.name`,
`this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked
as variables.
|