daurnimator
04a2a4a7cb
std: track decoded string length in std.json tokenizer
2019-12-31 02:26:06 +11:00
daurnimator
0def92cff4
std: use enum literals in std.json
2019-12-30 23:47:33 +11:00
daurnimator
80d37a13c0
std: use a union(enum) for std.json.Token
2019-12-30 23:47:29 +11:00
daurnimator
17cc511ea4
std: fmt std/json.zig
2019-12-30 22:34:19 +11:00
Andrew Kelley
e0c7d12043
update std/json.zig to latest language changes
...
fixes regression from 54231e832bae780c5012fc5cd30932447f1e1d47
2019-12-29 19:00:27 -05:00
Andrew Kelley
54231e832b
Merge pull request #3648 from xackus/json-unescape
...
breaking: JSON unescape
2019-12-29 18:31:10 -05:00
Lachlan Easton
fe0e8c87b7
Tokenizer: Copy optional tokens prior to being set to null #3737 ( #3910 )
...
* Tokenizer: Copy optional tokens prior to being set to null #3737
* Add TODO comments, reminder to audit copying optional pattern.
2019-12-16 11:01:02 -05:00
Robin Voetter
4b4fbe3887
Replace @typeOf with @TypeOf in all zig source
...
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-12-10 11:09:41 -05:00
xackus
c27d06596b
fix integers parsed as floats
2019-12-10 10:30:41 -05:00
Andrew Kelley
0237e7a701
std.io.getStdOut and related fns no longer can error
...
Thanks to the Windows Process Environment Block, it is possible to
obtain handles to the standard input, output, and error streams without
possibility of failure.
2019-11-13 04:01:40 +00:00
xackus
f9b7d6d75d
Fix bugs in JSON parser
...
Make comments into documentation where appropriate
2019-11-11 23:25:54 +01:00
xackus
371747d8fb
json: surrogate pair support
...
test json.Parser with tests used for json.Streaming parser
(some don't pass yet)
2019-11-11 22:06:00 +01:00
xackus
739f716108
minor fixes
2019-11-11 19:06:35 +01:00
xackus
f6d124418f
Fix and document
2019-11-10 22:26:42 +01:00
xackus
6d0cdf7cd7
Unescape JSON strings
2019-11-10 22:05:03 +01:00
Andrew Kelley
e0db54e89d
update the codebase to use @as
2019-11-08 15:57:24 -05:00
Sebastian Keller
f81f36e2ff
std.json.Value: added dumpStream(), utilize WriteStream for dump()
2019-11-06 18:21:52 -05:00
Sebastian Keller
dd4e9fb16b
Fixed a leak in the json parser.
...
parseString() created a copy of the string using the wrong allocator.
Instead of using the ArenaAllocator, it was using the allocator passed
into Parser.init(). This lead to a leak as the copied string was not
freed when the ArenaAllocator was deinited.
2019-11-06 14:00:36 -05:00
Andrew Kelley
b37c009683
Merge pull request #3541 from xackus/language_server
...
* fix json parser crashing on empty input
* make implicit cast of tagged unions to enums easier to find in docs
2019-10-28 15:08:33 -04:00
xackus
36fa5fabc6
rename error and specify it in function
2019-10-27 21:52:28 +01:00
xackus
eeb6536c85
better test name for empty string
...
Co-Authored-By: Andrew Kelley <andrew@ziglang.org>
2019-10-27 21:41:52 +01:00
Sebastian Keller
78b00c0b51
Added test for 'emitJson'
2019-10-27 20:49:42 +01:00
xackus
a0abd3be85
fix json parser crashing on empty input
...
remove unreachable code
2019-10-27 10:45:54 +01:00
Andrew Kelley
01b2c291d5
miscellaneous improvements to generated docs
...
* introduce std.json.WriteStream API for writing json
data to a stream
* add WIP tools/merge_anal_dumps.zig for merging multiple semantic
analysis dumps into one. See #3028
* add std.json.Array, improves generated docs
* add test for `std.process.argsAlloc`, improves test coverage and
generated docs
2019-10-10 23:25:40 -04:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
...
that's all this commit does. further commits will fix cli flags and
such.
see #2221
2019-09-25 23:35:41 -04:00