-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUE #857
Comments
I would like to suggest that for now we iterate on the initial CUE lexer via pull requests into https://github.com/myitcvforks/chroma. That will allow for testing, iteration etc without creating too much noise here. As you can see from the tip of @alecthomas how does that sound? If that works, please feel free to assign this issue to me in case that helps with your workflow/project management. I'm a full time contributor to the CUE project and will help to coordinate here in whatever way helps make things easy for you and the chroma project. I also wonder whether you could help advise how best to work with a lexer that is not yet complete. Is there a way of writing an XML-based lexer such that it relaxes in case it encounters a syntactic element it doesn't know about, rather than emitting errors? |
That's sounds fine to me.
I think just having a fallback pattern like this should do it: <rule pattern=".">
<token type="Text"/>
</rule> |
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. Closes alecthomas#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. Closes alecthomas#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
Great. I actually bit the bullet and tried to sketch out a pretty decent first cut, which is now pushed up in #858.
Thanks, appreciate the pointer. I also learned a great deal from looking at the other lexers. |
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
Is there an existing issue for this?
What is the missing lexer?
CUE (https://cuelang.org/) is an open source configuration, policy, validation, data and schema language. It has a rich set of APIs and tooling, for defining, generating, and validating all kinds of data: configuration, APIs, database schemas, code, etc.
Links to existing syntax definitions
We are working on various syntax definitions based on the language spec:
https://cuelang.org/docs/references/
The most complete representations to date are:
TextMate grammars will follow.
The text was updated successfully, but these errors were encountered: