Commit Graph

12 Commits

Author SHA1 Message Date
35466f691f Added C99 support, refactored headers 2021-02-15 16:20:04 -06:00
8d37f1f243 Renamed cosmoV_readObj to cosmoV_readRef to reduce ambiguity
also fixed several typos
2021-02-07 14:00:00 -06:00
cff26574bb Fixed table iteration bug, added vm.globals to debug lib 2021-01-25 16:14:51 -06:00
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