def lex_atomic_task_before_punctuation

qasim-bend-kit@0.1.0.2 · proof/JSON_SourceProof.bend:961

import qasim-bend-kit@0.1.0.2/proof/JSON_SourceProof.bend as JSONSourceProof
import Base
import qasim-bend-kit@0.1.0.2/libs/JSON.bend as J

961def lex_atomic_task_before_punctuation(+atom: AtomicValue,
962                                       +mode: RenderMode,
963                                       +punctuation: Char,
964                                       +suffix: String,
965                                       +acc: List<&2, J.Lexeme>,
966                                       action: {J.lex_seed_action(SCon{punctuation, suffix}, J.Outside{}) == J.LexPunctuation{punctuation} : J.LexAction}) -> {J.lex_scan(render_task(atomic_value(atom), mode, SNil{}) ++ (SCon{punctuation, SNil{}} ++ suffix), J.Outside{}, SNil{}, acc) == J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation} <> List.append(&2, J.Lexeme, reverse_source_task(atomic_value(atom), mode), acc)) : List<&2, J.Lexeme>}:
967    Equal.trans(List<&2, J.Lexeme>,
968        J.lex_scan(render_task(atomic_value(atom), mode, SNil{}) ++ (SCon{punctuation, SNil{}} ++ suffix),
969            J.Outside{}, SNil{}, acc),
970        J.lex_scan(J.render(atomic_value(atom), False{}, SNil{}) ++ (SCon{punctuation, SNil{}} ++ suffix),
971            J.Outside{}, SNil{}, acc),
972        J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation} <>
973            List.append(&2, J.Lexeme, reverse_source_task(atomic_value(atom), mode), acc)),
974        Equal.cong(String, List<&2, J.Lexeme>, text =>
975            J.lex_scan(text ++ (SCon{punctuation, SNil{}} ++ suffix), J.Outside{}, SNil{}, acc),
976            render_task(atomic_value(atom), mode, SNil{}), J.render(atomic_value(atom), False{}, SNil{}),
977            atomic_task_render(atom, mode)),
978        Equal.trans(List<&2, J.Lexeme>,
979            J.lex_scan(J.render(atomic_value(atom), False{}, SNil{}) ++ (SCon{punctuation, SNil{}} ++ suffix),
980                J.Outside{}, SNil{}, acc),
981            J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation} <>
982                List.append(&2, J.Lexeme, reverse_source_task(atomic_value(atom), RenderWhole{}), acc)),
983            J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation} <>
984                List.append(&2, J.Lexeme, reverse_source_task(atomic_value(atom), mode), acc)),
985            lex_atomic_reverse_before_punctuation(atom, punctuation, suffix, acc, action),
986            Equal.cong(List<&2, J.Lexeme>, List<&2, J.Lexeme>, items =>
987                J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation} <>
988                    List.append(&2, J.Lexeme, items, acc)),
989                reverse_source_task(atomic_value(atom), RenderWhole{}),
990                reverse_source_task(atomic_value(atom), mode),
991                Equal.sym(List<&2, J.Lexeme>, reverse_source_task(atomic_value(atom), mode),
992                    reverse_source_task(atomic_value(atom), RenderWhole{}), atomic_task_source(atom, mode)))))

Uses (23)

Used by (1)