def lex_simple_task_before_punctuation

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

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

994def lex_simple_task_before_punctuation(+simple: SimpleValue,
995                                       +mode: RenderMode,
996                                       +punctuation: Char,
997                                       +suffix: String,
998                                       +acc: List<&2, J.Lexeme>,
999                                       action: {J.lex_seed_action(SCon{punctuation, suffix}, J.Outside{}) == J.LexPunctuation{punctuation} : J.LexAction}) -> {J.lex_scan(render_task(simple_value(simple), 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(simple_value(simple), mode), acc)) : List<&2, J.Lexeme>}:
1000    match simple mode:
1001        case SimpleAtom{atom} RenderWhole{}:
1002            lex_atomic_task_before_punctuation(atom, RenderWhole{}, punctuation, suffix, acc, action)
1003        case SimpleAtom{atom} RenderMembers{}:
1004            lex_atomic_task_before_punctuation(atom, RenderMembers{}, punctuation, suffix, acc, action)
1005        case SimpleAtom{atom} RenderAfterSeparator{}:
1006            lex_atomic_task_before_punctuation(atom, RenderAfterSeparator{}, punctuation, suffix, acc, action)
1007        case SimpleEmptyArray{} RenderWhole{}:
1008            lex_empty_array_reverse_before_punctuation(punctuation, suffix, acc, action)
1009        case SimpleEmptyArray{} RenderMembers{}:
1010            lex_close_before_punctuation(']', punctuation, suffix, acc, {==}, action)
1011        case SimpleEmptyArray{} RenderAfterSeparator{}:
1012            lex_close_before_punctuation(']', punctuation, suffix, acc, {==}, action)
1013        case SimpleEmptyObject{} RenderWhole{}:
1014            lex_empty_object_reverse_before_punctuation(punctuation, suffix, acc, action)
1015        case SimpleEmptyObject{} RenderMembers{}:
1016            lex_close_before_punctuation('}', punctuation, suffix, acc, {==}, action)
1017        case SimpleEmptyObject{} RenderAfterSeparator{}:
1018            lex_close_before_punctuation('}', punctuation, suffix, acc, {==}, action)

Uses (19)

Used by (2)