Commit Graph

66 Commits

Author SHA1 Message Date
f97f93d92c applied rustfmt and clippy auto fix 2022-02-21 18:27:46 +08:00
d9cb506f6a nac3core: refactored for better error messages 2022-02-21 18:24:19 +08:00
b267a656a8 nac3core: added exception type and fixed primitive representation
- Added `Exception` primitive type and some builtin exception types.
  Note that all exception types share the same layout, and should
  inherit from the base `Exception` type. There are some hacks in the
  toplevel module for handling exception types, we should revisit and
  fix them later.
- Added new primitive types to concrete type module, otherwise there
  would be some weird type errors.
- Changed the representation of strings to CSlice<u8>, instead of
  CString.
2022-02-12 22:13:59 +08:00
050c862c1a nac3core: function codegen callback changes
Added code generator argument to the callback, so it would be easier to
write complicated codegen with that callback. To prepare for RPC
codegen.
2022-02-12 21:24:41 +08:00
4976e89ae2 nac3core: list slice support 2022-01-13 16:53:32 +08:00
1bd966965e fixed M-Labs/nac3#146 2021-12-27 22:56:50 +08:00
9e3f75255e update inkwell. Closes #67 2021-12-25 22:17:06 +08:00
e2b44a066b return int32 in len(). Closes #141 2021-12-20 17:44:42 +08:00
b5637a04e9 nac3core: use official implementation for len 2021-12-13 10:44:33 +08:00
2c6601d97c nac3core: fix len on range with step of different sign 2021-12-13 10:44:33 +08:00
82359b81a2 nac3core: fix bool to int conversion 2021-12-13 04:13:43 +08:00
b7892ce952 nac3core: add len support for list and range 2021-12-09 01:37:00 +08:00
1c31aa6e8e consistent naming 2021-12-02 10:45:46 +08:00
aa2d79fea6 Merge branch 'master' into built_in_floor_ceil 2021-12-02 01:08:55 +08:00
fa2fe8ed5d nac3core: add ceil and floor 2021-12-01 03:23:58 +08:00
7ede4f15b6 nac3core: move builtin definitions to another file 2021-12-01 02:52:00 +08:00