1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-04 22:09:54 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
Calvin Rose
872b39cc32 Add syntax literals for signed and unsigned 64 bit integers.
Number literals can now take an optional "representation" suffix

- Use `:n` for normal numbers (IEEE-754 doubles)
- Use `:s` for signed 64 bit integers
- Use `:u` for unsigned 64 bit integers
- Other suffix will fallthrough the usual parseing logic. This means
  that they will only possibly resolve to symbols if they start with -,
  +, or .

The syntax does not collide with any existing valid Janet and is only
enabled with JANET_INTTYPES. This also leaves open a syntax for other
number types such as bignums, ratios, decimals, etc.
2024-07-21 09:45:44 -05:00
Ian Henry
fa609a5079
fix some typos in docstrings 2023-10-03 19:17:18 -07:00
Calvin Rose
8183cc5a8d Disallow converting negative numbers to int/u64
The wrap-around rule doesn't make sense once subtraction is
properly fixed.
2023-07-09 22:25:20 -05:00
Calvin Rose
3b6371e03d Add test case for issue #1217 2023-07-09 21:56:41 -05:00
primo-ppcg
2007438424 add tests for inttypes bnot 2023-07-01 21:49:49 +07:00
primo-ppcg
b3db367ae7 Add test cases for div and mod 2023-06-30 19:48:45 +07:00
Ico Doornekamp
c0f5f97ddb Added misc tests to increase test coverage 2023-06-03 19:06:51 +02:00
sogaiu
9675411f35 Reorganize tests 2023-06-02 07:04:07 +09:00