Skip to main content

Module read

Module read 

Source
Expand description

read: the parser’s tree for a host that must look inside a frame without recognising it again (SPEC-010 REQ-002: one parser). A client dispatches on a performative, reads :thread, or lifts a (define …) out of a teach frame; each of those is a read, not a judgement, and every host makes it through this export rather than a reader of its own, so no two readers of one frame can disagree (SPEC-013 REQ-018).

The tree is JSON in the shape the web client’s reader always produced: a list is an array; a quoted string is {"str": …}; a symbol, keyword (with its colon), number, or boolean is its source text.

Functions§

read_str
Parse one S-expression (comments included) and return its tree as JSON.