def scan_field

qasim-bend-kit@0.1.0.2 · proof/JSON_RenderLexProof.bend:329

import qasim-bend-kit@0.1.0.2/proof/JSON_RenderLexProof.bend as JSONRenderLexProof
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_SourceProof.bend as SP

329def scan_field(+key: String,
330               +text: String,
331               +acc: List<&2, J.Lexeme>) -> {J.lex_scan(J.render_object_field(SNil{}, key, text), J.Outside{}, SNil{}, acc) == J.lex_scan(text, J.Outside{}, SNil{}, J.Punctuation{':'} <> J.Payload{("\"" ++ J.escape_string(key) ++ "\"")} <> acc) : List<&2, J.Lexeme>}:
332    Equal.trans(List<&2, J.Lexeme>,
333        J.lex_scan(J.render_object_field(SNil{}, key, text), J.Outside{}, SNil{}, acc),
334        J.lex_scan(("\"" ++ J.escape_string(key) ++ "\"") ++ (":" ++ text), J.Outside{}, SNil{}, acc),
335        J.lex_scan(text, J.Outside{}, SNil{}, J.Punctuation{':'} <> J.Payload{("\"" ++ J.escape_string(key) ++ "\"")} <> acc),
336        Equal.cong(String, List<&2, J.Lexeme>,
337            x => J.lex_scan(x, J.Outside{}, SNil{}, acc),
338            J.render_object_field(SNil{}, key, text),
339            ("\"" ++ J.escape_string(key) ++ "\"") ++ (":" ++ text),
340            field_text(key, text)),
341        SP.lex_object_key_before_colon(key, text, acc))

Uses (13)

Used by (1)