codespan icon indicating copy to clipboard operation
codespan copied to clipboard

Add examples of working with other libraries

Open brendanzab opened this issue 5 years ago • 3 comments

It would be nice to show how codespan can be used in conjunction with other libraries. Some ones we might want to show are:

Candidate libraries

Incremental Compilation

We get a number of requests (#172, #179) about Salsa, so we could do with a simple example showing how we recommend using it with codespan-reporting!

Parsers

Many people get started building languages using parser generators, so showing them how to get codespan hooked up to these would be very useful!

  • [ ] LALRPOP
  • [ ] combine
  • [ ] Nom
  • [ ] Pest (from memory this is hard-coded to use codemap, so I'm not sure if it is possible))
  • [x] peg

Pretty printing

It would be nice to have an example of pretty printing types, with source code highlighting, and potentially nifty things like type diffs.

brendanzab avatar Jun 24 '19 01:06 brendanzab

I'm currently working on a project that uses codespan-reporting and salsa.

Stupremee avatar Aug 01 '20 09:08 Stupremee

Oh wow, this looks like a nice thing to learn from in general!

brendanzab avatar Aug 01 '20 09:08 brendanzab

I made a minimal example of using salsa & codespan-reporting to get on-demand computation (so you only calculate spans and stuff for the errors you actually emit)

Kixiron avatar Aug 01 '20 18:08 Kixiron