* chore(deps): update all non-major dependencies
* fix: fixes for test and lint
Test was slow because we were deep-comparing lexers. This is
unnecessary as we can just shallow compare.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alec Thomas <alec@swapoff.org>
* added: another rule for objectpascal lexer
* updated: objectpascal lexer testdata
* fixed: processing of control (escape) characters
* updated: test data for objectpascal lexer
Initial version (proposal) of an ObjectPascal lexer
- the assembler state is not in use yet...
- the Intrinsic Routines rule is commented out and probably not needed...
This commit adds a decent first-cut of a lexer for CUE
(https://cuelang.org).
The main aspects of the language are implemented, but there are likely a
number of edge cases not covered, especially when it comes to string
interpolation, but this is a sufficiently decent first cut so as to
warrant merging into the chroma project rather than first working in a
fork.
This was tested locally for visual correctness using
mkdir -p _examples
(command cd ./cmd/chroma; go run . --lexer=cue --html --html-inline-styles) < lexers/testdata/cue.actual > _examples/cue.html
and then loading _examples/cue.html in a browser.
Closes#857
* test: fix up writing up float scores with trailing newlines
This ensures we consistently write a trailing newline when RECORD=true
is set.
* lexers: update expected files using proper newlines
This is the mechanical result of running:
RECORD=true go test ./lexers
* Assert lexer tests based on equality of byte encodings
This helps to ensure that running RECORD=true go test ./lexers on a
given commit for which the tests pass will not result in any changes in
the working tree.
Notes that as a result of this change, the following command results in
a clean working tree:
RECORD=true go test ./lexers
Fixes#855