KOS_OP_MATCH_CAPTURES
Style: EXTRA (RAW, RAW, CONST): mark depth, cursor depth, names tuple.
Stack:
[...]->[..., caps]; cannot miss.Semantics: Push the captures of the mark at depth
a0: each filled slot under its name ina2, an empty slot absent. Over a tuple, list, other sequence or single valuecapsis a dict. Over a pair spine it is aDatumFramewhose position is the first cell’s and whose source is the span from the mark’s position to the cursor at deptha1: the first cell itself when the span is empty or runs to the spine’s end, the car read throughDatumfor one cell, otherwise a tuple of the cars. RaisesValueErrorwhen the spine no longer reaches the cursor’s cell from the mark’s.Invariants:
a2is a tuple; Code construction raisesValueErrorotherwise. A names tuple without one name per slot of the mark raisesSystemError.Compiler form: Emitted by the match compiler at the end of a standalone matcher, for a named group, and at the end of each pass of an uncaptured repeat that captures.