Commit Graph

9 Commits

Author SHA1 Message Date
eb2f50e456 Added CObjError, cosmoV_throw(), pcall(), and cosmoV_printError()
Errors are now handled very differently, parser errors and VM errors are now treated the same.
When cosmoV_error is called, cosmoV_throw is also called, which formats the error object and sets the panic state.
state->error now points to the latest CObjError when state->panic is true. To get a nice formatted Objection message, use
cosmoV_printError() and pass the state->error. pcall() was added to the standard base library. When called, the first argument
passed is called with the subsequent arguments given. If the call completed successfully, `true`,`nil` is returned. However
when an error occurs during the call, `false`,`<error>` is returned. Simply print the `<error>` to retrieve the error string.
2021-01-05 22:27:59 -06:00
ec3552a155 organized flags 2021-01-04 16:20:05 -06:00
7e9b61e018 minor refactor, fixed many warnings 2021-01-01 23:06:24 -06:00
9012f9231b Added assert() to base library
also fixed regression in call()
2020-12-27 13:36:17 -06:00
e0d51c191f renamed cosmoV_makeObject 2020-12-05 17:55:09 -06:00
b936827cc6 added support for NaN boxing (8 byte CValues!) 2020-12-04 00:04:14 -06:00
204bec3d0a added IStrings, added __index functionality 2020-11-16 19:58:16 -06:00
c42a72dfad Major refactoring, added classes, many bug fixes 2020-11-09 19:44:12 -06:00
2e1b745624 Initial commit 2020-10-28 00:16:30 -05:00