def lex_array_after_separator_single

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

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
import qasim-bend-kit@0.1.0.2/proof/JSON_LexWhitespaceProof.bend as W

1088def lex_array_after_separator_single(+head: J.Value,
1089                                     +punctuation: Char,
1090                                     +suffix: String,
1091                                     +acc: List<&2, J.Lexeme>,
1092                                     action: {J.lex_seed_action(SCon{punctuation, suffix}, J.Outside{}) == J.LexPunctuation{punctuation} : J.LexAction},
1093                                     head_lex: {J.lex_scan(render_task(head, RenderWhole{}, "]" ++ (SCon{punctuation, SNil{}} ++ suffix)), J.Outside{}, SNil{}, acc) == J.lex_scan(SCon{punctuation, SNil{}} ++ suffix, J.Outside{}, SNil{}, J.Punctuation{']'} <> List.append(&2, J.Lexeme, reverse_source_task(head, RenderWhole{}), acc)) : List<&2,
1094                                     J.Lexeme>}) -> {J.lex_scan(render_after_separator(J.Arr{head <> Nil{}}, SCon{punctuation, SNil{}} ++ suffix), J.Outside{}, SNil{}, acc) == J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation} <> J.Punctuation{']'} <> List.append(&2, J.Lexeme, reverse_source_task(head, RenderWhole{}), acc)) : List<&2, J.Lexeme>}:
1095    Equal.trans(List<&2, J.Lexeme>,
1096        J.lex_scan(render_after_separator(J.Arr{head <> Nil{}}, SCon{punctuation, SNil{}} ++ suffix),
1097            J.Outside{}, SNil{}, acc),
1098        J.lex_scan(render_task(head, RenderWhole{}, "]" ++ (SCon{punctuation, SNil{}} ++ suffix)),
1099            J.Outside{}, SNil{}, acc),
1100        J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation} <> J.Punctuation{']'} <>
1101            List.append(&2, J.Lexeme, reverse_source_task(head, RenderWhole{}), acc)),
1102        Equal.cong(String, List<&2, J.Lexeme>, text => J.lex_scan(text, J.Outside{}, SNil{}, acc),
1103            render_after_separator(J.Arr{head <> Nil{}}, SCon{punctuation, SNil{}} ++ suffix),
1104            render_task(head, RenderWhole{}, "]" ++ (SCon{punctuation, SNil{}} ++ suffix)),
1105            render_after_separator_array_single(head, SCon{punctuation, SNil{}} ++ suffix)),
1106        Equal.trans(List<&2, J.Lexeme>,
1107            J.lex_scan(render_task(head, RenderWhole{}, "]" ++ (SCon{punctuation, SNil{}} ++ suffix)),
1108                J.Outside{}, SNil{}, acc),
1109            J.lex_scan(SCon{punctuation, SNil{}} ++ suffix, J.Outside{}, SNil{}, J.Punctuation{']'} <>
1110                List.append(&2, J.Lexeme, reverse_source_task(head, RenderWhole{}), acc)),
1111            J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation} <> J.Punctuation{']'} <>
1112                List.append(&2, J.Lexeme, reverse_source_task(head, RenderWhole{}), acc)),
1113            head_lex,
1114            W.scan_punctuation_char(punctuation, suffix, SNil{}, J.Punctuation{']'} <>
1115                List.append(&2, J.Lexeme, reverse_source_task(head, RenderWhole{}), acc), action)))

Uses (19)

Used by (2)