Online playground for lezer

Is there an online playground for lezer similar to Tree-sitter|Playground?

I’d love to see how error resilient it is. Should I expect any difference to tree sitter in this respect?

No, there is no online playground.

Lezer uses a somewhat different error-recovery algorithm, and is thus likely to behave differently from tree-sitter.

1 Like

I made an online playground: https://lezer-sandbox.vercel.app/

4 Likes

Very handy web app! I think a link to this from the official documentation would be handy, it’s a good way to try out ideas and see what’s possible right away. Very helpful for iterating on my grammar.

@koch I’m glad you’re making good use of the sandbox! :slight_smile: Any thoughts on how it may be improved?

I get an error that says highlight is null, even after refreshing the page countless times and disabling adblock. Could you fix this please?

2 Likes

@marijn, both: https://lezer-sandbox.vercel.app/ and https://lezer-sandbox-1gurlbleb-a61.vercel.app/ (linked from https://lezer.codemirror.net/) seem to be broken (Cannot read properties of null (reading 'styleTags') in Chrome/highlight is null in Firefox and Could not find "@lezer/highlight", respectively). Any chance of fixing one of them?

1 Like

No, those aren’t mine, as this very thread clearly tells you. I’ve removed the link from the website.

1 Like

For people who have been refreshing this thread every so often (as I have), I made a new small playground :smiley:

11 Likes

I have created one lezer playground yesterday and it just now occured to me to check if some other option exists already :sweat_smile:

Anyway, here is my take on the playground:

3 Likes

I find your playground to be one of the best, but would definitely help for it to be oriented horizontally :slight_smile: