Commit graph

185 commits

Author SHA1 Message Date
Ayaz Hafiz
5ba646d3e0
Remove decodeElems and handle end-of-list appropriately 2022-08-01 11:07:27 -05:00
Ayaz Hafiz
ffb7f7a001
Naive decoding of lists 2022-08-01 10:12:45 -05:00
Ayaz Hafiz
03463a2a5e
Naive string decoding 2022-08-01 09:56:59 -05:00
Ayaz Hafiz
d1880cae76
Add a comment 2022-08-01 09:50:18 -05:00
Ayaz Hafiz
e1c8b3c9b0
Format Json.roc 2022-08-01 09:48:38 -05:00
Ayaz Hafiz
c85c865b05
Bool decoding 2022-08-01 09:47:42 -05:00
Ayaz Hafiz
a00953128d
Use asciiByte helper 2022-08-01 09:47:35 -05:00
Ayaz Hafiz
e00ebbead7
Properly parse floats 2022-08-01 09:32:05 -05:00
Ayaz Hafiz
f06ed1a647
Add FIXME comments 2022-08-01 09:08:19 -05:00
Ayaz Hafiz
6a4a3e2c60
Expose Json.fromUtf8 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
10ce5d0615
Implement Json fromBytes without let-generalization 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
3fdde9e8f0
Stub out a decoder implementation for Json 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
623f5698ac
Qualify Encode.custom 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
df3ee468c6
Remove unneeded imports 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
b602c1fa2f
Qualify JSON encode names 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
41af6d96a8
Remove unnecessary comment from Json module 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
fc71e3df04
Add Decode to the load graph 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
de1588e760
Add the Decode module 2022-08-01 08:09:22 -05:00
Folkert de Vries
66365fba6e
Merge pull request #3649 from rtfeldman/3640-str-split-edge-case
Fix `Str.split` edge case when string and delimiter are equal
2022-07-28 11:30:40 +02:00
Folkert de Vries
21fe0ca559
Merge pull request #3639 from rtfeldman/expect-lists
Tests for expect output
2022-07-28 08:53:58 +02:00
raleng
c7997c7c38
Fix formatting 2022-07-28 01:57:01 +02:00
raleng
17fc1a297c
Fix Str.split when string equals delimiter
countSegments and strSplitHelp check whether the length of the string is
strictly greater-than the length of the delimiter, skipping most of the
logic when this is not the case.

Changing the check to a greater-than-or-equal allows for the case when
the string and the delimiter are equal, giving the expected result of
["", ""].
2022-07-28 01:36:02 +02:00
raleng
71e83746cc
add countSegments test case
The test ensures countSegments returns a count of two when the string
and the delimiter are equal. The expected result of Str.split in that
case is ["", ""].
2022-07-28 01:35:08 +02:00
raleng
261ff3224d
Add strSplitHelp test cases
Add a test for the case when the string starts with the delimiter, and
when the string and the delimiter are equal.
2022-07-28 01:34:20 +02:00
Folkert
8e5b0daa94
figured out how to serialize nested structures 2022-07-27 23:52:11 +02:00
Folkert
e62a0ee39a
make string clone return where next extra bytes should be written 2022-07-27 22:48:41 +02:00
Folkert
f7452b8889
pass the shared buffer to zig directly 2022-07-27 17:16:12 +02:00
Folkert
498004c554
clean up expect code when not running tests 2022-07-27 12:26:03 +02:00
Folkert
40d7e94a17
make the mmapped buffer configurable 2022-07-26 23:36:25 +02:00
Folkert
6d0e751999
fix bug in expect handling on the cli side 2022-07-25 22:37:36 +02:00
Richard Feldman
4a371b9524
roc format List.roc 2022-07-25 19:15:39 +02:00
Richard Feldman
f216224495
Fix off-by-one in List.splitFirst and splitLast 2022-07-25 19:15:38 +02:00
Richard Feldman
6f1932eae4
Fix endsWith off-by-one error 2022-07-25 19:15:38 +02:00
Richard Feldman
d60ad6b5af
Fix iterateBackwards 2022-07-25 19:15:36 +02:00
Richard Feldman
1c2047fbeb
Rename an argument 2022-07-25 19:15:36 +02:00
Richard Feldman
3991bd31d6
Don't qualify iterateBackwards 2022-07-25 19:15:36 +02:00
Richard Feldman
038e999009
roc format List.roc 2022-07-25 19:15:35 +02:00
Richard Feldman
6a3694cf8f
Fix some errors and warnings 2022-07-25 19:15:35 +02:00
Richard Feldman
bae99413dd
Expose List.startsWith and List.endsWith 2022-07-25 19:15:34 +02:00
Richard Feldman
a5384effee
Improve some doc comments 2022-07-25 19:15:33 +02:00
Richard Feldman
c87f2fdee1
Add List.splitFirst and List.splitLast 2022-07-25 19:15:33 +02:00
Richard Feldman
87f03d1f9f
Add List.findLast and findLastIndex 2022-07-25 19:15:32 +02:00
Richard Feldman
46abf539bf
Drop unnecessary parens 2022-07-25 19:15:32 +02:00
Richard Feldman
f3b8025d8d
Rename List.find and findIndex to include 'First' 2022-07-25 19:15:32 +02:00
Richard Feldman
661376958c
Add List.startsWith and List.endsWith 2022-07-25 19:15:31 +02:00
Folkert
012c6a75d1
simplify RocStr to array in zig 2022-07-24 11:50:28 +02:00
Folkert
ab3a431db7
add string cloning helper 2022-07-23 00:08:01 +02:00
Ayaz Hafiz
3a57af8731
Format Json.roc 2022-07-19 14:30:20 -04:00
Ayaz Hafiz
f3105eca6e
Format Json.roc 2022-07-18 22:14:39 -04:00
Ayaz Hafiz
d2da395619
Syntactic ability links in solve 2022-07-18 18:33:28 -04:00