| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Fixes #2256
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Added:
- support for space delimitor in every case, included multiline value
- check for odd number of backslash escapes
- "!" as comment start
- support for escape of spaces and separators
Dropped:
- undocumented ";" and "//" comment start
|
|
|
| |
Merge consecutive tokens together where possible.
|
| |
|
| |
|
|
|
| |
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
|
|
|
| |
Also fix a broken link and decode as UTF8 in count_token_references.py.
|
| |
|
| |
|
|
|
|
|
| |
Make it parse comments that are not their own line.
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Cleanup
* Add scope access operator
* Add enum keyword
* Update test ref
* Fix bug for tokenizing number formats
* Add pr to CHANGES
|
| |
|
|
|
|
| |
Adds support for SSE/AVX/AVX-512 registers and 'rel' and 'abs' address
operators.
|
|
|
|
|
|
|
|
|
|
| |
* Add GAP console session mode
This is also appropriate for GAP .tst files.
Add `analyse_text` methods for `ScilabLexer` and `GAPConsoleLexer` to
distinguish Scilab and GAP .tst files
* Use explicit name for 'keepends' argument to splitlines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes an issue where in code like this:
```
int foo(float bar) // hello() {}
```
The lexer would match `(float bar) // hello()`
as the parameters of the function `foo`, instead
of just `(float bar)`.
In addition, a similar test case to what was originally
reported in #2208 is added.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations (#2208)
Something like
id id2("){ ... }");
is no longer wrongly recognized as a "function"
id id2(") {
...
}
");
As the difference in the tests shows, this has the unfortunate side
effect that we no longer highlight something like
int f(param="default");
as a function declaration, but it is hard to imagine another way to
fix this (cf. “most vexing parse” problem).
Fixes #2207
|
|
|
|
| |
Very sorry about this!
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* Added COMAL-80 language highlight.
Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
|
|
|
|
| |
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
|
|
|
| |
Co-authored-by: Fabian Huch <huch@in.tum.de>
|
|
|
|
|
|
| |
- Add new predeclared identifiers: `any` and `comparable`
- Add new operator for type parameters: `~` and `|`
Ref: https://go.dev/ref/spec
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #2163
|
| |
|
|
|
|
|
|
|
|
|
| |
identifiers (#2158)
. is not an operator in Coq: in this specific usage, it is only meant to build a qualified name, so this rule really corresponds to a proper lexical rule in Coq
Unlike most languages, Coq has a large set of special words that are not reserved: they may still be used as identifiers. For example Prop is a special word, which currently gets highlighted as such in Equations.Prop.Equations, but it should be recognized as a regular name there. Because of how flexible the syntax of Coq is, it's not straightforward to disambiguate things with just a bunch of regexes, so we have to rely on heuristics. Skipping qualified names from being recognized as keywords is an easy win.
|
| |
|
|
|
| |
Use `Name.Builtin`.
|
|
|
|
|
| |
* Ada 2022: adding support for at sign
* Ada 2022: adding support for square brackets
* Ada 2022: introducing test for new syntactic additions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Initial commit for MCFunction Lexer + tests
* Apply suggestions from code review
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
* added docstring info + fix for run ... command
* remove string ending Error tokens
* not working - refactor in-progress
* fixed: generic property
* Update pygments/lexers/mcfunction.py
Co-authored-by: Georg Brandl <georg@python.org>
* apply some fixes from comments
* Update pygments/lexers/mcfunction.py
Co-authored-by: Georg Brandl <georg@python.org>
* spacing
* updated tests and applied more suggestions
* fixed comment regex, passes tests
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
Co-authored-by: Georg Brandl <georg@python.org>
|
|
|
|
| |
Adds recognition of 'def'/'type^'/'type~' keywords and adds some
missing characters to the regexes for identifiers and punctuation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nested type names were being highlighted as if they were function names.
Now a phrase like `Spec.Process.run` is highlighted properly as:
- `Name.Class`
- `Punctuation`
- `Name.Class`
- `Punctuation`
- `Name.Function`
Instead of wrongly highlighted as it was before this commit:
- `Name.Class`
- `Punctuation`
- `Name.Function`
- `Punctuation`
- `Name.Function`
|
|
|
|
|
|
| |
Now the Savi lexer can tokenize string interpolation inside strings,
which is a new feature added to Savi since the last time this
lexer was updated.
|
|
|
|
|
|
|
| |
Prior to this change, every underscore/private identifier
in Savi code was being highlighted as if it were a class name.
After this change, only those whose first letter is uppercase
will be highlighted as such, which is the correct behavior.
|
|
|
|
|
| |
The previous example shows the old usage of the testing framework.
Now the example reflects the current usage/API of that framework.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add Macaulay2 lexer
* Update symbols for Macaulay2 1.18
* Match whitespace characters in Macaulay2 lexer
* Add states for strings/comments in Macaulay2 lexer
* Update Macaulay2 lexer tests for string/comment edge cases
* Improve comment and string matching in Macaulay2 lexer
Instead of matching each character one at a time, we match all
characters without special meaning together.
* Update Macaulay2 test output
* Update Macaulay2 lexer symbols for 1.19 release
* Move "auto-generated" comment in Macaulay2 lexer down a few lines
* Fix underline length in Macaulay2 lexer docstring
* Add url field for Macaulay2 lexer
* Bump copyright year for Macaulay2 lexer
|
|
|
|
| |
(#2099)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uxn is a virtual machine which represents a personal computing
playground, and is described here:
https://100r.co/site/uxn.html
Uxntal assembly language is described here:
https://wiki.xxiivv.com/site/uxntal.html
The demo code piano.tal is used with permission.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Lex identifiers after `case` as constants
Add a state for marking identifiers preceded by a `case` keyword as
constants.
Additionally, refactor the `label` rule to no longer permit a `case`
keyword before a label.
Consequentially, identifiers after a `case` keyword (like `foo` in
`case foo:`) are no longer wrongly lexed as `Name.Label`, but as
`Name.Constant`.
In addition, this fixes #2076, as multiple `case` keywords in one
line are lexed the same.
* Add test for multiple `case` keywords in one line
* Fix existing tests
* Lex `::` as Operator and not Name.Constant
After a `case`, when lexing a namespaced name, like `foo::bar`, lex the
namespace operator `::` as Operator, and not Name.Constant.
* Regenerate tokens
|
|
|
|
|
| |
Non-builtin names were scanned character by character, possibly
causing recognition of a suffix as builtin.
|