Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Design model

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

The front-end is split into three layers:

  1. Grammar layer (beskid.pest): token and production definitions.
  2. Parsing layer (src/parsing): traversal helpers that map parse trees into typed syntax nodes.
  3. Syntax layer (src/syntax/items, src/syntax/types): stable Rust structs/enums consumed by resolver, analysis, docs, and formatter paths.

For newcomers, the practical rule is simple: if a language construct changes, update grammar and syntax together, then confirm semantic passes still read the resulting nodes as expected.

extend type is a top-level module item for type extension (see extend type). Parser responsibilities:

  1. Discovery orderProgram.items preserves source order; mod host discovery walks items deterministically.
  2. Merge semantics — Generated extend type contributions merge with hand-authored extensions under host validation before semantic analysis.
  3. Legacy removalMetaDefinition AST nodes must be removed from parser output.

HIR lowering for extend type is documented in AST and HIR shape contract.