Module sdl_parser

Source
Expand description

Parse the human-editable SDL source format (written by init) into an EntityGraphIR. This mirrors the behaviour of parseSdl() in @prometheus-ags/entity-graph-sdl.

The source format has entities as a JSON object (keyed by name), whereas the IR uses a flat array. The parser also validates field types, enum values, and relation cross-references, matching the TypeScript reference implementation.

Structsยง

AiRaw ๐Ÿ”’
LocalFirstRaw ๐Ÿ”’
SdlConfigRaw ๐Ÿ”’
SdlDocument ๐Ÿ”’
SdlEntityDef ๐Ÿ”’
SdlFieldDef ๐Ÿ”’
SdlRelationDef ๐Ÿ”’

Functionsยง

parse_relation_kind ๐Ÿ”’
parse_scalar ๐Ÿ”’
parse_sdl_source
Parse the human-editable SDL source JSON into an EntityGraphIR.