Commit 6df21c5
committed
BigInt support for QuickJS
Literals have the `n` suffix: `0n`, `-20n`. They can be parsed from a
string:(ex: `x = BigInt("12..34")`) and serialized back to a string with
`toString()` (ex: `emit(x.toString())`).
Currently this is a minimal, standards compliant implementation which doesn't
do automatic JSON parsing directly to BigInts or automatically serializing to
JSON. It should be possible to introduce that in the future, but it's better to
start from something simpler first.1 parent b2ff65a commit 6df21c5
File tree
2 files changed
+27
-1
lines changed- src
- couch_quickjs/c_src
- couch/test/eunit
2 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
440 | 441 | | |
441 | 442 | | |
442 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
443 | 468 | | |
444 | 469 | | |
445 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
0 commit comments