Document project setup for new grammars #16

Closed
opened 2023-06-17 01:55:01 +02:00 by savq · 2 comments
savq commented 2023-06-17 01:55:01 +02:00 (Migrated from github.com)

I'm interested in contributing to an existing lezer grammar, and also creating a new lezer grammar from scratch. However, the existing docs don't explain how to install and get started with lezer. The basic example explains the syntax for lezer grammars but assumes you've already installed lezer-generator (and links to the API reference, which again doesn't explain this).

I've seen some lezer grammars use yarn or rollup, but it's not clear whether these are necessary or just a preference of the developers. I know this might be obvious to a web developer, but I'm not a web developer.

For comparison, the tree-sitter docs for creating parsers start with a list of dependencies, installation steps, project setup and a sanity check to ensure the development environment has been set up correctly. I'd be great if lezer had a similar section in its documentation.

I'm interested in contributing to an existing lezer grammar, and also creating a new lezer grammar from scratch. However, the existing docs don't explain how to install and get started with lezer. The [basic example](https://lezer.codemirror.net/examples/basic/) explains the syntax for lezer grammars but assumes you've already installed `lezer-generator` (and links to the API reference, which again doesn't explain this). I've seen some lezer grammars use `yarn` or `rollup`, but it's not clear whether these are necessary or just a preference of the developers. I know this might be obvious to a web developer, but I'm not a web developer. For comparison, the tree-sitter docs for [creating parsers](https://tree-sitter.github.io/tree-sitter/creating-parsers) start with a list of dependencies, installation steps, project setup and a sanity check to ensure the development environment has been set up correctly. I'd be great if lezer had a similar section in its documentation.
marijnh commented 2023-06-19 13:42:41 +02:00 (Migrated from github.com)

I've added an example that goes through this in a bit more detail.

I've added [an example](https://lezer.codemirror.net/examples/setup/) that goes through this in a bit more detail.
savq commented 2023-06-19 22:56:45 +02:00 (Migrated from github.com)

Thanks Marijn, this helps a lot!

Thanks Marijn, this helps a lot!
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/website#16
No description provided.