Skip to content

Conversation

@myitcv
Copy link
Contributor

@myitcv myitcv commented Sep 23, 2023

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

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 alecthomas#857
@myitcv myitcv mentioned this pull request Sep 23, 2023
Closed
1 task
@alecthomas alecthomas merged commit 827bd93 into alecthomas:master Sep 23, 2023
@alecthomas
Copy link
Owner

Thanks, looks good.

For future reference you can just run ./bin/chroma to compile and run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants