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?
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.
I made an online playground: https://lezer-sandbox.vercel.app/
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! 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?
@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?
No, those aren’t mine, as this very thread clearly tells you. I’ve removed the link from the website.
For people who have been refreshing this thread every so often (as I have), I made a new small playground
I have created one lezer playground yesterday and it just now occured to me to check if some other option exists already
Anyway, here is my take on the playground:
I find your playground to be one of the best, but would definitely help for it to be oriented horizontally
Great work with the playground!
I must say having the 4 windows as a pane is a great idea, such that change in one reflects in another.
It is hard to imagine the interdependency of all the 4 ( grammar, actual test file, parsed tree and highlight.js) without seeing all 4 together.
great work!
Your playground app should be adopted as a default playground for more developers to write their grammar