Calvin Rose
90313afd40
Update PEG documentation and peg syntax.
...
Disable tail calls in the root scope for better
stacktraces, as the root scope may contain a single call
to a failing function, as in the case of the test suite.
2019-01-14 20:41:32 -05:00
Calvin Rose
d0ec89c7c1
Update Matchtime captures to not include all of the
...
matched text automatically, and fix pattern recursion
in grammars.
2019-01-14 17:44:21 -05:00
Calvin Rose
170e785b72
Fix recursion in grammars.
2019-01-14 15:06:35 -05:00
Calvin Rose
192705113e
Add Matchtime captures to peg (Equivalent to LPegs lpeg.Cmt).
...
This allows that pattern to call an external function to
check if some text should match or not. This allows for
matching any possible language a computer can recognize.
2019-01-14 11:45:45 -05:00
Calvin Rose
ff0d3a0081
Compile pegs to bytecode with (peg/compile). Peg
...
performance is improved, and peg syntax has been expanded with a few
more keywords.
2019-01-13 23:54:41 -05:00
Calvin Rose
798c88b4c8
Update peg to allow functions over captures. Update C API
...
to make janet function calls easier and faster from C (still
needs an object pool for fibers, though). Fix bug in scan-number
and add many more peg tests.
2019-01-12 17:31:15 -05:00
Calvin Rose
83f4a11bf3
Add some more tests, add parameterized captures to patterns,
...
and fix some bugs.
2019-01-12 11:04:47 -05:00
Calvin Rose
d7626f8c57
Add more capturing capabilities including substitutions, as well
...
as back references for PEGs. More documentation is needed for PEG
syntax, but the amount required will need an external document, not
just a docstring.
2019-01-12 10:16:25 -05:00
Calvin Rose
40845b5c1b
Initial peg implementation. Tree walk interpretted with
...
no captures, so not yet ready.
2019-01-11 19:22:24 -05:00
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
5b1a3b8208
Make grammar tool completely generate grammar from scratch.
...
Remove grammar from source tree.
2019-01-08 19:59:54 -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
6f3bc3d577
Update copyright date, fix types, remove trailing whitespace.
2019-01-06 03:23: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
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
ddba0010b0
Make test output less verbose.
2019-01-02 23:06:23 -05:00
Calvin Rose
a679f60e07
Add assembly test.
2019-01-02 19:58:27 -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
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
d724c5b959
Update number representation so that wrapping numbers isn't
...
doesn't need to check for NaNs. Change ordering of types.
2018-12-30 12:37:50 -05:00
Calvin Rose
7880d73201
Add some documentation for looping and the loop macro.
...
Also add :pairs verb to the loop macro and some more tests.
2018-12-29 17:23:31 -05:00
Calvin Rose
2bcedd5920
Remove indexing with numeric constants from janet.
2018-12-28 23:44:39 -05:00
Calvin Rose
6b95326d7c
First commit removing the integer number type. This should
...
remove some complexity and unexpected behavior around numbers in
general as all numbers are the same number type, IEEE 754 double
precision numbers. Also update examples and tests, some of which were
out of date.
Some more testing may be needed for new changes to numbers.
2018-12-27 13:05:29 -05:00
Calvin Rose
17283241ab
Fix bug in compiler with if form under certain conditions.
...
Begin bundled 'cook' tool for managing janet projects.
2018-12-25 15:32:42 -05:00
Calvin Rose
99e14a9b70
Rename bitwise operators.
2018-12-16 22:13:48 -05:00
Calvin Rose
03dbd79165
Rename the := special form to set so it does not look like a keyword.
2018-12-16 21:57:32 -05:00
Calvin Rose
bc8be266f5
Update match macro to test for array/tuples and table/structs.
2018-12-08 11:04:19 -05:00
Calvin Rose
11cd1279d7
Update Makefile and fix fiber issues. When
...
creating an invalid fiber with the C api, the
program could segfault. This protects against this kind
of segafault.
2018-12-02 15:29:21 -05:00
Calvin Rose
4e4dd31164
Change syntax for namespaces.
...
Add quasiquote, unquote, and unquote-splicing
as specials rather than a macro.
2018-11-30 22:49:21 -05:00
Calvin Rose
52c919d96f
Add qq (, uq and uqs) for a quasiquote macro.
...
quasiquoting is not (yet) supported as a special
form and has no syntactic sugar.
2018-11-30 01:58:52 -05:00
Calvin Rose
7dbad20150
Update core and some examples to use the new
...
syntax.
2018-11-29 14:03:45 -05:00
Calvin Rose
b0c45fd15e
Multisyms for easier access into structures.
2018-11-29 13:30:59 -05:00
Calvin Rose
8bfea73ee7
Fix web build again, simplify fibers and fiber
...
implementation code.
2018-11-26 09:03:26 -05:00
Calvin Rose
b2a1a4ec9b
Add classes to core library.
2018-11-25 15:58:50 -05:00
Calvin Rose
d4ee760b3e
Change format for declaring flexible arity functions.
2018-11-25 14:03:00 -05:00
Calvin Rose
d791077e25
Fix abstract? function.
2018-11-23 15:33:49 -05:00
Calvin Rose
184fe31e0c
Add generator expressions for easier iteration.
...
Similar to python generator, but with the same
syntax as the loop macro.
2018-11-20 21:48:06 -05:00
Calvin Rose
92202e1c8b
Add invert and simplify
...
env-lookups to env-lookup
2018-10-21 11:46:36 -04:00
Calvin Rose
98f2c6feab
Add lookups for marshalling and unmarshalling.
...
Allow generating lookup tables from the current environment.
2018-10-21 01:35:07 -04:00
Calvin Rose
e8a4e83a0d
Update Makefile, json native module,
...
and test suite 2.
2018-10-04 17:25:46 -04:00
Calvin Rose
f41dab8f6c
Fix error in string.replace-all
2018-09-29 20:01:57 -04:00
Calvin Rose
5baf70f4c6
Add tests.
2018-09-06 14:22:34 -04:00
Calvin Rose
c8ef2a0d88
Rename to janet
2018-09-05 22:18:42 -04:00
Calvin Rose
45d0597294
Remove apply1 and optimize apply.
2018-08-26 12:53:39 -04:00
Calvin Rose
ecdef8de8b
Working fiber marshaling.
2018-08-24 11:35:08 -04:00
Calvin Rose
f5b4bc4fdf
Add array and tuple versions of map and for.
2018-08-23 11:10:48 -04:00
Calvin Rose
45f8db0360
Add a few more tests.
2018-08-23 10:27:42 -04:00
Calvin Rose
510feeed7f
Allow marshaling of more functions for core.
...
Fix indentation in some files.
2018-08-22 21:41:25 -04:00