stew / codebase

0 stars 2 forks source link

JSON Parser and tests #3

Closed ceedubs closed 3 years ago

ceedubs commented 3 years ago

This also fixes a bug that I found in the tokenizer where the null match didn't make the recursive !go call.

The changes summarized below are available for you to review, using the following command:

pull-request.load git@github.com:stew/codebase:.json.trunk git@github.com:ceedubs/unison-dev:.pr.json.recJsonAndTests

Updates:

 parser.tokenizer.jsonTokenizer : '{Tokenizer () Char JsonToken} ()
 ↓
 parser.tokenizer.jsonTokenizer : '{Tokenizer () Char JsonToken} ()
 +  unisoncomputing2021 : License
 +  authors.stew        : Author
 +  authors.ceedubs     : Author

 patch patch (added 4 updates,
deleted 4)

Added definitions:

 parser.arrayOf                  : 'Parser () JsonToken Json
                                 -> Parser () JsonToken Json (+2 metadata)
 parser.json.tests.expectParse   : Text -> Json -> [Test.Result] (+2 metadata)
 parser.json                     : Parser () JsonToken Json (+2 metadata)
 parser.jsonOf                   : 'Parser () JsonToken Json
                                 -> Parser () JsonToken Json (+2 metadata)
 parser.json.tests.mixed         : [Test.Result] (+3 metadata)
 parser.json.tests.negativeFloat : [Test.Result] (+3 metadata)
 parser.json.tests.negativeInt   : [Test.Result] (+3 metadata)
 parser.json.tests.null          : [Test.Result] (+3 metadata)
 parser.objectOf                 : 'Parser () JsonToken Json
                                 -> Parser () JsonToken Json (+2 metadata)
 parser.json.tests.positiveFloat : [Test.Result] (+3 metadata)
 parser.json.tests.positiveInt   : [Test.Result] (+3 metadata)
 parser.string                   : Parser () JsonToken Json (+2 metadata)
 parser.json.tests.string        : [Test.Result] (+3 metadata)
 parser.text                     : Parser () JsonToken Text (+2 metadata)
ceedubs commented 3 years ago

This was merged