def trailing_tab
qasim-bend-kit@0.1.0.2 · proof/JSON_LexWhitespaceProof.bend:497
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
497def trailing_tab(+text: String,
498 +mode: J.LexMode,
499 +reversed: String,
500 +acc: List<&2, J.Lexeme>) -> {J.lex_scan(text ++ "\t", mode, reversed, acc) == J.lex_scan(text, mode, reversed, acc) : List<&2, J.Lexeme>}:
501 match text:
502 case SNil{}:
503 match mode:
504 case J.Outside{}: {==}
505 case J.Quoted{}: {==}
506 case J.Escaped{}: {==}
507 case SCon{head, tail}:
508 Equal.trans(List<&2, J.Lexeme>, J.lex_scan(SCon{head, tail} ++ "\t", mode, reversed, acc),
509 J.lex_scan(tail ++ "\t", after_mode(J.lex_seed_action(SCon{head, tail}, mode), mode),
510 after_reversed(J.lex_seed_action(SCon{head, tail}, mode), head, reversed),
511 after_acc(J.lex_seed_action(SCon{head, tail}, mode), head, reversed, acc)),
512 J.lex_scan(SCon{head, tail}, mode, reversed, acc),
513 lex_scan_step(head, tail ++ "\t", mode, reversed, acc),
514 Equal.trans(List<&2, J.Lexeme>,
515 J.lex_scan(tail ++ "\t", after_mode(J.lex_seed_action(SCon{head, tail}, mode), mode),
516 after_reversed(J.lex_seed_action(SCon{head, tail}, mode), head, reversed),
517 after_acc(J.lex_seed_action(SCon{head, tail}, mode), head, reversed, acc)),
518 J.lex_scan(tail, after_mode(J.lex_seed_action(SCon{head, tail}, mode), mode),
519 after_reversed(J.lex_seed_action(SCon{head, tail}, mode), head, reversed),
520 after_acc(J.lex_seed_action(SCon{head, tail}, mode), head, reversed, acc)),
521 J.lex_scan(SCon{head, tail}, mode, reversed, acc),
522 trailing_tab(tail, after_mode(J.lex_seed_action(SCon{head, tail}, mode), mode),
523 after_reversed(J.lex_seed_action(SCon{head, tail}, mode), head, reversed),
524 after_acc(J.lex_seed_action(SCon{head, tail}, mode), head, reversed, acc)),
525 Equal.sym(List<&2, J.Lexeme>, J.lex_scan(SCon{head, tail}, mode, reversed, acc),
526 J.lex_scan(tail, after_mode(J.lex_seed_action(SCon{head, tail}, mode), mode),
527 after_reversed(J.lex_seed_action(SCon{head, tail}, mode), head, reversed),
528 after_acc(J.lex_seed_action(SCon{head, tail}, mode), head, reversed, acc)),
529 lex_scan_step(head, tail, mode, reversed, acc))))