rally/parser

Page module parser using Glance AST. Parses page source files to extract the page contract: custom types (ToServer, ToClient) with full variant/field info, and function presence (server_update, server_init, load, etc.).

Values

pub fn parse_client_context(
  source: String,
) -> Result(types.ClientContextContract, String)

Parse a client_context.gleam source to extract the contract.

pub fn parse_page(
  source source: String,
  module_path module_path: String,
) -> Result(types.PageContract, String)

Parse a page module source to extract the contract. Uses Glance AST parsing for robust type extraction.

Search Document