Calvin Rose
16ebb11181
Add buffer/bit functions and buffer/blit. Expose janet_gethalfrange
...
in the C api for less duplicated range checking code.
2019-01-09 13:25:51 -05:00
Calvin Rose
115ed9cbb9
Move pretty printing to separate file pp.c
...
Simplify string.c and remove janet_puts.
2019-01-09 11:47:29 -05:00
Calvin Rose
3ae6f64de5
Fix popen bug.
2019-01-08 21:42:16 -05:00
Calvin Rose
ff3f7487a4
Add splice special form to grammar.
2019-01-08 20:05:36 -05:00
Calvin Rose
f0afb3c311
Update README to indicate how to get latest grammar file.
2019-01-08 20:02:01 -05:00
Calvin Rose
5b1a3b8208
Make grammar tool completely generate grammar from scratch.
...
Remove grammar from source tree.
2019-01-08 19:59:54 -05:00
Calvin Rose
b1e0849a2f
Restore old status logic - (status checks in run_vm should be using
...
the previous status, not the current which is always JANET_STATUS_ALIVE)
2019-01-08 13:42:29 -05:00
Calvin Rose
67f26b7d72
Fix = should have been ==. Add some tests for vm type asserts.
2019-01-08 12:26:01 -05:00
Calvin Rose
d5bab72620
Add a test for making method calls
2019-01-07 14:54:39 -05:00
Calvin Rose
aa079e3145
Fix parser regression.
2019-01-07 14:49:38 -05:00
Calvin Rose
d64a57297d
Update examples, add method like semantics to calling keywords.
2019-01-07 14:47:47 -05:00
Calvin Rose
be85196de8
Add callgrind task to Makefile.
...
Unify some parser states.
2019-01-06 21:49:24 -05:00
Calvin Rose
eae4e0dede
Add functionality that allows the set macro to
...
take a tuple as an l-value. Remove the old
multi-sym report in anticipation of a different
mechanism.
2019-01-06 19:33:27 -05:00
Calvin Rose
92e9e64945
Update CONTRIBUTING.md and make valtest
2019-01-06 12:32:44 -05:00
Calvin Rose
63dd6d03f4
Fix english
2019-01-06 12:05:40 -05:00
Calvin Rose
2a79d2e749
Remove check for function calls to enable all types,
...
even nil. Now any value can be called as a function, usually
looking itself up in an associative data structure.
2019-01-06 11:56:40 -05:00
Calvin Rose
6f3bc3d577
Update copyright date, fix types, remove trailing whitespace.
2019-01-06 03:23:03 -05:00
Calvin Rose
ef5eed2c21
Add source location to doc macro.
2019-01-06 02:10:56 -05:00
Calvin Rose
5865692401
Surround embedded documentation with a macro so it
...
can be disabled in a future build.
2019-01-06 01:49:56 -05:00
Calvin Rose
b626e73d19
Add extra argument to (native) to allow for passing
...
in custom environment to add stuff to.
2019-01-05 23:37:10 -05:00
Calvin Rose
b535c91ee1
Fix native module issue.
2019-01-05 22:52:28 -05:00
Calvin Rose
7b28032f5c
More explicit casts to please Microsoft compiler.
2019-01-05 21:58:39 -05:00
Calvin Rose
0fdd404a71
Remove duplicate functionality in string.c
2019-01-05 21:23:44 -05:00
Calvin Rose
1f98eff33a
Fix compiler warnings on emscripten.
2019-01-05 20:52:32 -05:00
Calvin Rose
338b31f5a2
Add janet_fixarity. Update emscripten source.
2019-01-05 20:45:24 -05:00
Calvin Rose
b60e3e302a
Update C API to use friendlier functions rather than macros.
...
Error handling is implemented with setjmp/longjmp so code
can be more concise. This required a very large but straight forward refactor for all
of the libraries.
2019-01-05 20:09:03 -05:00
Calvin Rose
5b62c8e6db
Better working panic implementation and more cleanup in main vm loop.
2019-01-05 00:33:20 -05:00
Calvin Rose
cd6a7793e8
WIP panic functionality.
2019-01-04 23:20:34 -05:00
Calvin Rose
5afb00859a
More cleanup in vm.c
2019-01-04 21:15:37 -05:00
Calvin Rose
001917f8d9
Begin clean up of vm.c
...
Replace the oparg macro with 5 named virtual registers, combine
pc++ with vm_next() macro to be more terse, and move setup and
teardown logic of janet_continue into a separate function.
These changes are preparation for using setjmp/longjmp to do
error handling in the VM. Introducing longjmp for error handling in
the VM would allow it to be used in the C API, which could result in
simpler, more compact code.
2019-01-04 20:08:43 -05:00
Calvin Rose
b9c0fc8201
Allow calling keywords and symbols as functions to look
...
themselves up in a data structure. Allow calling a data
structure to look up the argument.
2019-01-03 22:48:43 -05:00
Calvin Rose
d8b0a5ed01
Make parser API more robust - the value queue is now
...
distinct from the parse state, and is queried separately.
2019-01-03 20:48:54 -05:00
Calvin Rose
5fa96a6f8c
Add documentation on all of the special forms.
2019-01-03 17:16:34 -05:00
Calvin Rose
dd3fc24a1e
Make number syntax a bit stricter - no leading underscores
...
and no underscores in exponent.
2019-01-03 12:13:14 -05:00
Calvin Rose
ddba0010b0
Make test output less verbose.
2019-01-02 23:06:23 -05:00
Calvin Rose
337a498edb
Fix some keyword related issues.
2019-01-02 22:08:51 -05:00
Calvin Rose
5fff36d047
Remove janet_symbol_from_string api function.
2019-01-02 20:50:31 -05:00
Calvin Rose
a679f60e07
Add assembly test.
2019-01-02 19:58:27 -05:00
Calvin Rose
58d480539c
Fix assembler labels after keyword update.
2019-01-02 19:55:42 -05:00
Calvin Rose
6afaacf2af
Update documentation on keywords.
2019-01-02 19:46:24 -05:00
Calvin Rose
e9c94598e6
Add native keyword type to replace symbols with leading ':'
...
character.
2019-01-02 19:41:07 -05:00
Calvin Rose
29ec30c79f
Fix number parsing for bases between 2 and 9.
...
Allow multisyms to have number keys.
2019-01-02 16:39:24 -05:00
Calvin Rose
122312dbf6
Fix some typos and update comments.
2019-01-02 12:21:59 -05:00
Calvin Rose
618f8d6818
Add with-syms and combine bignat_add and bignatr mul
...
into a single operation for strtod.c
2019-01-02 10:23:11 -05:00
Calvin Rose
0d4ab7dee0
Add some more test cases for bad arities.
2018-12-30 18:44:00 -05:00
Calvin Rose
6b4824c2ab
Fix error behavior when calling functions with incorrect arities.
2018-12-30 18:41:44 -05:00
Calvin Rose
8dde89126e
Fix -s flag in janet binary.
2018-12-30 18:23:29 -05:00
Calvin Rose
56927e1b81
Fix -e option.
2018-12-30 17:51:15 -05:00
Calvin Rose
9e6254bf56
Rename pre-walk and post-walk to prewalk and postwalk.
2018-12-30 15:34:01 -05:00
Calvin Rose
fe22a8db39
Fix 32 bit platforms janet number handling.
2018-12-30 14:23:52 -05:00