scan ( stream accum char -- stream accum ) - Factor Documentation

scan ( stream accum char -- stream accum )


Vocabulary
json .private

Inputs
stream an object
accum an object
char an object


Outputs
stream an object
accum an object


Definition
USING: combinators json kernel namespaces sequences ;

IN: json.private

: scan ( stream accum char -- stream accum )
{
{ 34 [ over read-json-string suffix! ] }
{ 91 [ 1 json-depth +@ json-open-array ] }
{ 44 [ v-over-push ] }
{ 93 [ -1 json-depth +@ json-close-array ] }
{ 123 [ json-open-hash ] }
{ 58 [ v-pick-push ] }
{ 125 [ json-close-hash ] }
{ 32 [ ] }
{ 9 [ ] }
{ 13 [ ] }
{ 10 [ ] }
{ 116 [ "rue" pick json-expect t suffix! ] }
{ 102 [ "alse" pick json-expect f suffix! ] }
{ 110 [ "ull" pick json-expect json-null suffix! ] }
[ pick json-number [ suffix! ] dip [ scan ] when* ]
} case ;

AltStyle によって変換されたページ (->オリジナル) /