def lex_simple_array_after_separator

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

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

1382def lex_simple_array_after_separator(+values: List<&2, SimpleValue>,
1383                                     +mark: JsonPunctuation,
1384                                     +suffix: String,
1385                                     +acc: List<&2, J.Lexeme>) -> {J.lex_scan(render_after_separator(J.Arr{simple_values(values)}, SCon{punctuation_char(mark), SNil{}} ++ suffix), J.Outside{}, SNil{}, acc) == J.lex_scan(suffix, J.Outside{}, SNil{}, J.Punctuation{punctuation_char(mark)} <> List.append(&2, J.Lexeme, reverse_source_task(J.Arr{simple_values(values)}, RenderAfterSeparator{}), acc)) : List<&2, J.Lexeme>}:
1386    match values:
1387        case Nil{}:
1388            lex_close_before_punctuation(']', punctuation_char(mark), suffix, acc, {==}, punctuation_action(mark, suffix))
1389        case head <> Nil{}:
1390            lex_array_after_separator_single_source(simple_value(head), punctuation_char(mark), suffix, acc,
1391                punctuation_action(mark, suffix),
1392                lex_simple_task_suffix_before_punctuation(head, RenderWhole{}, ']', SCon{punctuation_char(mark), SNil{}} ++ suffix, acc, {==}))
1393        case head <> next <> tail:
1394            lex_array_after_separator_many(simple_value(head), simple_value(next), simple_values(tail),
1395                punctuation_char(mark), suffix, acc, punctuation_action(mark, suffix),
1396                lex_simple_task_suffix_before_punctuation(head, RenderWhole{}, ',',
1397                    render_after_separator(J.Arr{simple_value(next) <> simple_values(tail)}, SCon{punctuation_char(mark), SNil{}} ++ suffix),
1398                    acc, {==}),
1399                lex_simple_array_after_separator(next <> tail, mark, suffix,
1400                    J.Punctuation{','} <> List.append(&2, J.Lexeme, reverse_source_task(simple_value(head), RenderWhole{}), acc)))

Uses (22)

Used by (0)

No other definition uses this definition.