def prefix_acc

qasim-bend-kit@0.1.0.2 · proof/JSON_LexWhitespaceProof.bend:86

import qasim-bend-kit@0.1.0.2/proof/JSON_LexWhitespaceProof.bend as JSONLexWhitespaceProof
import Base
import qasim-bend-kit@0.1.0.2/libs/JSON.bend as J

86def prefix_acc(text: String,
87               +mode: J.LexMode,
88               +reversed: String,
89               +acc: List<&2, J.Lexeme>) -> List<&2, J.Lexeme>:
90    match text:
91        case SNil{}: acc
92        case SCon{+head, +tail}:
93            prefix_acc(tail, after_mode(J.lex_seed_action(SCon{head, tail}, mode), mode),
94                after_reversed(J.lex_seed_action(SCon{head, tail}, mode), head, reversed),
95                after_acc(J.lex_seed_action(SCon{head, tail}, mode), head, reversed, acc))

Uses (8)

Used by (3)