Skip to content

Learn Pegium

Pick the path that fits how you like to learn.

Start with the end-to-end walkthrough. It builds a complete, working language — the statemachine example — file by file: AST, grammar, validation, service wiring, a CLI, and an optional language server. Every step uses real source you can run and copy. From there, learn how to test your language and consume the AST headlessly.

Prefer a slower, concept-by-concept tour? Read the Build a Language guides — one subsystem per page:

  • the AST
  • grammar
  • references and scoping
  • validation
  • formatting
  • LSP services
  • the workspace lifecycle

To start from a working skeleton, see Create a Project.

If you learn best from a concrete codebase, keep the examples overview open as you work through the steps.