This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.
PhraseSlot
type PhraseSlot = | { kind: "keyword"; tokenTypes: string[];} | { bindingPower?: number; kind: "expr";};Defined in: packages/engine/src/parser/PhrasePattern.ts:33
A single slot in a phrase-grammar alternative.
keyword: consumes exactly one token whose type is intokenTypes. Its matched token is recorded in thecapturesarray passed toemit()(in slot order). This is how an alternative distinguishes “between X and Y” from “from X to Y” if it needs to.expr: parses a full sub-expression viaparser.parseExpression(). Its bytecode is emitted inline, in slot order, exactly like a hand-written parselet callingparseExpression()directly. Not recorded incaptures(there’s no single token to record).