Skip to content

A simple syntax processing system that prioritizes latency over correctness

License

Notifications You must be signed in to change notification settings

ChimeHQ/Lowlight

Build Status Discord

Lowlight

A simple syntax processing system that prioritizes latency over correctness

  • partial document "parsing"
  • Very simple data-based description of languages
  • Get information about tokens and scopes

You may be wondering why someone would ever want something like this. To do accurate syntax analysis, you have to parse. Parsing requires processing a document, in its entirety, from beginning to end.

  • The parsing system itself requires initialization
  • The document must then be parsed
  • Some queries must be run over the parse tree to get the needed information

All of these components require non-zero time, and that time scales, at best, linearly with the size of the document. Lowlight can process fragments of documents. It does not produce parse trees, only enough information to make reasonable guesses at tokens and scopes.

Lowlight is useful as very fast first pass. It fits in well with a multi-pass highlighting system like Neon.

Warning

This is currently very WIP.

Installation

dependencies: [
    .package(url: "https://github.com/ChimeHQ/Lowlight", branch: "main")
],

Contributing and Collaboration

I would love to hear from you! Issues, Discussions, or pull requests work great. A Discord server is also available for live help, but I have a strong bias towards answering in the form of documentation.

I prefer collaboration, and would love to find ways to work together if you have a similar project.

I prefer indentation with tabs for improved accessibility. But, I'd rather you use the system you want and make a PR than hesitate because of whitespace.

By participating in this project you agree to abide by the Contributor Code of Conduct.

About

A simple syntax processing system that prioritizes latency over correctness

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Languages