| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* make ts extends js lexer
* add regex's d flag for js lexers
cf. https://v8.dev/features/regexp-match-indices
* update js builtins, operators, exceptions
* fixup! update js builtins, operators, exceptions
* add typescript override keywork
* Update _mapping.py
|
| | |
| | |
| | |
| | |
| | | |
Treat true/false/nil as constants.
Also separate out declarations from other special forms and macros.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
regex_opt() groups characters in sets when possible. The
warning was caused when the "[" character ended up at the beginning
of a set: r"[[...]". This emits a FutureWarning since Python 3.7
due to possible changes in semantics in the future
(https://bugs.python.org/issue30349). Just add "[" to the list
of characters that should be escaped in sets. Add unit tests
for words().
[Closes #1853.]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.]
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* tcl lexer: no error for @ or ,
* examplefiles --> snippets
* rename test file to convention
|
| | |
| | |
| | |
| | |
| | |
| | | |
The PR #1819 provides a tool to identify unique token types. This PR
aims to remove the most obvious cases of unicorn styles which are used
in a single lexer only.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | |
| | |
| | |
| | | |
The CFamilyLexer was matching whitespace as Text instead of Whitespace.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
CFamilyLexer failed to tokenize preprocessor macros when they were
preceded by line break surrounded by spaces. This was the case because
prerpocessor regex rule expected to start at the beginning of the line,
but the space regex rule matched also the whitespace after the line
break. Now the space rule has been refined not to match the line break.
Because of this, the preprocessor regex rule correctly matches
prerpocessor tokens even when they are preceded by white spaces, at the
cost of adding some more tokens in the token stream in some cases. This
change preserves the behavior of invalid preprocessor usage failing to
tokenize.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Add a Meson language lexer
* update the mappings
* Add meson to the list of supported languages
* Add a meson.build example file
|
| | |
| | |
| | |
| | | |
fixes #1843
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
* groovy lexer: parse keywords before function names like java
* groovy lexer: detect quoted function names
* changes: update groovy lexer
|
| |
| |
| |
| |
| | |
* Support Terraform 0.14 syntax
* Use \S instead of [^\s]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix PromQL lexer to support values enclosed within single quotes
Values for labels could now be enclosed within single or double quotes.
* Fix a typo into the lables regex for PromQL lexer
The correct label matching operator is `!~` instead of `~!`.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
* Added new modifier tokenizer.
* Add expected output for the AMDGPU test.
* Used "words" function.
|
| |
| |
| |
| | |
Fixes #1771
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lexers: python: add test cases for floats
* lexers: python: fix float lexing
* lexer:python:fixed test syntax
Co-authored-by: Aidan Do <giahuydo99@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lexers: devicetree: allow node label without root node
It is sometimes useful to render DeviceTree snippets such as:
foo: bar@1234 {
foo = "bar";
};
However the snipper shown above does not render properly unless it is
enclosed on a root node, i.e.
/{
foo: bar@1234 {
foo = "bar";
};
};
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
* tests: add devicetree lexer test for fragments out of root node
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* add WebAssembly lexer
* avoid test failure by using the default function instead of an empty regex
* address small issues
* fix WebAssembly string escapes
* change WebAssembly multiline comment parsing
* update copyright year
* set versionadded to 2.9
* change WebAssembly tests to use the new test system
* change WebAssembly unit test to use snippets
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Filename to <th> if linenos=table (fixes #1757)
* Emit `<th>` for `filename` if `linenos=table`.
* Added test cases for filename inclusion.
* Updated CHANGES
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add NestedText lexer
* Add NestedText to list of supported languages
* Add some more test cases
* Update tests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Two small tweaks to the APL lexer:
1. Add all APL file suffixes
2. Allow leading _ in variable names (GNU APL, Dyalog)
* Build mappings to pick up new file extensions
* Add tests for APL:
1. Leading underscores for variables OK (Dyalog, GNU)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add a teal lexer
* fix an indent
* convert tests, fix version, alias
* fix examplefile
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Added ThingsDB Language support
* Update ThingsDB language
* add comments to syntax
* Update to new test system.
Co-authored-by: Jeroen van der Heijden <joente@gmail.com>
Co-authored-by: Matthäus G. Chajdas <dev@anteru.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add KuinLexer
* Add golden test output.
* Update mapfiles.
* Update URL.
* Fix regex lint failures.
Co-authored-by: tatt61880 <tatt61880@gmail.com>
Co-authored-by: Matthäus G. Chajdas <dev@anteru.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add apdl and gcode lexers
* Added requested changes except words function
* Added requested changes except words function
* Added words function to handle lists of keywords
* Add two testing example files
* Delete two_dimensional_truss.ans
* Delete coupled_example.ans
* Create example1apdl.ans
* Create example2apdl.ans
* General cleanup of apdlexer and creation of mapfiles
* Escaped backslashes in string literals on apdlexer
* Removed backslashes. None was necessary in the first place
* Added apdl aliase and a * based command in the test file
* Forgot to create the map files
* Tested version. Also removed an unused function from apdlexer
* Added examples for gcode and golden output
* Trimming of gcode files to a few dozens of lines
* Removed duplicates from elafunb
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Update the Chapel lexer
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
* Update the test
Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Remove duplicate lines in state
* Refactor ident regex for readability
Refactor ident regex changed in c1a0d82 to improve readability.
Refactor namespaced_ident regex added in c1a0d82 to improve readability.
* Fix inline keword lexing
* Fix indentation
* Refactor CLexer keywords to 'keywords' state
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* use `id` not `name` for line anchors;
`name` attribute on `a` element is obsolete in html5;
* keep `name` to remain compatible with existing code;
* update docstring;
* update test files;
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add formatter for Pango Markup
* Code style improvement
* Code improvement + test case
* Changed test
* retrigger checks
* Make test independent of color style
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#1715)
* [julia] Update operators, keywords, and literal lists
* [julia] Support symbol macros
* [julia] Parse '..' operator juxtaposed with integers
* [julia] Identify Symbol literals
* [julia] Consume strings/commands faster & add triple-quoted command
* [julia] Support identifying operators with custom suffixes
* [julia] Add parsing for raw strings
* [julia] Share definition of interpolation
* [julia] Identify escaped ` and $ in commands
* [julia] Support non-standard string and commmand literals with flags
* [julia] Support variable names with interior exclamations
* [julia] Fix matching floats starting with decimal
* [julia] Compress nearly duplicate number matches with optional group
* [julia] Match double-underscored float literal
* [julia] Match hex float literals
* [julia] Test more non-numerical literal expressions
* [julia] Tag types in type contexts
* [julia] Identify console via `julia-repl` as well
* [julia] Be more conservative in identifying symbols
* [julia] Update example file to v1.6 `base/strings/string.jl`
* Address one CI failure
* Switch to non-emoji Unicode category So example
Hopefully fixes pypy3 CI failure
* fixup: remove duplicate operators already in DOTTED_OPERATORS_LIST
* [julia] Fix backslash operator
* [julia] List `true`, `false` with builtin names, not keywords
|
| | |
|
| |
| |
| |
| | |
fixes #1726
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix lexing of function names
This fixes #1561.
Add a keywords state that matches inside and outside functions for
keywords.
Before this, when a keyword would appear the lexer would go to the
statements state, in which functions were not matched.
* Add tests for lexing of function names
* Unbreak previous tests
* Allow namespaced names in function statements
Add a second identifiers regex that matces all the previous identifiers
and also '::'.
I took the decision to create a second identifiers regex with '::'
inside, simply because using the old identifiers regex would hurt
performance massively on every solution I tried to craft.
* Add tests for namespaced names in functions
* Unbreak previous tests
* Add support for namespaces in namespace declarations
Add a namespace state that is entered each time the namespace keyword
is matched and lexes all name matches as namespaces.
Cases this approach doesn't cover:
* Namespaces in using declarations.
* Namespaces that prefix names in random code.
Unfortunately, in both of these cases the names before and after '::'
are not always namespaces.
* Add tests for namespace declartions
* Unbreak previous tests
* Tidy functions regex
Remove group nesting that became unneeded after fc56ab8 (the last big
refactor).
* Remove f string usage I introduced by mistake
|
| | |
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Python 3, RawTokenFormatter would output non-ASCII for non-ASCII
input, and RawTokenLexer would throw Unicode-related exceptions for
ASCII or non-ASCII input; fix them. Also, handle all exceptions, so
that callers who find RawTokenLexer via get_lexer_by_name on user
input don’t unexpectedly get a lexer that throws exceptions.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Add (all?) Matlab built-ins
See also https://de.mathworks.com/help/matlab/referencelist.html
* Adjust pytest goldens
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Fix #1698.
* Change default line number styling.
Instead of hardcoding black/light gray, use transparent/inherit which
makes it "neutral" out of the box. linenospecial is still hard-coded and
may look wrong, but that needs fixing in the style.
* Prettify the test files.
* Fix incorrect wrapping of TD linenos.
The padding would get applied twice to "special" lines, once via
<pre>, once via the <span>, which was not consistent with inline
line numbers where the .special style would override the default
style.
To fix this, we now emit "normal" and "special" lines for td.linenos
line numbers, and the normal style is applied to "normal". This brings
td.linenos closer to inline line numbers, and also makes the styling
between noclasses=True and noclasses=False consistent.
* Document the line number styling changes.
|
| | | |
|
| | | |
|