Commit Graph

141 Commits

Author SHA1 Message Date
Add00
38ba2273dd added accessors, write and additional tests 2023-08-10 23:00:26 -04:00
Kayne Ruse
62fe86f99b Fixed indexing in argument lists, resolved #102 2023-08-09 02:25:07 +10:00
Ratstail91
f885fdaf4c Short circuits are now functioning correctly, resolved #73 2023-08-06 04:28:02 +10:00
Kayne Ruse
cfec1b6911 Added int to float coercions to function args and returns, when specified 2023-08-06 02:17:32 +10:00
Kayne Ruse
deff784df8 Removed a speed test script 2023-06-14 16:40:01 +10:00
Kayne Ruse
54e82846c3 Massive dict copying optimisation, read more
I simply pre-allocated the new dict to the right size. This skips
internal copying logic which was repeated on every expansion. This
Should increase scope copying as well.

I applied the same logic to arrays, but the increase in speed was tiny.
2023-06-13 14:49:46 +10:00
Kayne Ruse
733df87c08 Added dist target, lowered recursion depth limit 2023-06-07 14:58:51 +10:00
Kayne Ruse
0949fd6ff9 Dang 2023-06-06 21:46:42 +10:00
Kayne Ruse
03e5096f10 Moved test_sum into it's own directory under scripts/ 2023-06-06 21:14:05 +10:00
Kayne Ruse
bb81b8c474 Changed recursion limit to 10,000 (was 200) 2023-06-06 21:02:01 +10:00
Kayne Ruse
1095e1a885 Added type casting a grouping bugfix, resolved #76 2023-03-17 20:57:47 +11:00
Kayne Ruse
2edfbbe3ef Found a compiler bug, thanks Aedan! 2023-03-17 14:01:16 +11:00
Kayne Ruse
1513ba9878 tweaked scripts folder 2023-02-23 22:45:38 +11:00
Kayne Ruse
92c71a374d Implemented a basic random library 2023-02-23 19:19:17 +11:00
Kayne Ruse
913738a4d1 Tweaked the runner test, should be orders of magnitude faster 2023-02-14 16:16:48 +00:00
Kayne Ruse
71b57fd42c Fixed scripts for distribution 2023-02-14 10:35:08 +00:00
Kayne Ruse
57af5a6d59 Tweaked some scripts 2023-02-14 09:21:22 +00:00
Kayne Ruse
eae96d6403 Corrected the order of arguments to Toy_callLiteralFn() 2023-02-14 08:00:35 +00:00
Kayne Ruse
16b71ba6f4 Implemented quicksort in _sort() 2023-02-13 13:31:58 +00:00
Kayne Ruse
9725f3c6a3 Patched some very obscure bugs 2023-02-12 16:54:44 +00:00
Kayne Ruse
724804a78a Playing with level.toy 2023-02-11 15:27:23 +00:00
Kayne Ruse
77a128e0f7 Added the -t option to the repl 2023-02-11 14:51:19 +00:00
Kayne Ruse
aeb008c684 Fixed unary negation bug, removed newline from print 2023-02-10 18:38:25 +00:00
Kayne Ruse
4fe57f9562 Added _containsKey() and _containsValue() 2023-02-10 15:27:39 +00:00
Kayne Ruse
3ba2e420ea Added _every() and _some() 2023-02-10 15:00:15 +00:00
Kayne Ruse
c81a139c97 Now handles unterminated block comments without freezing 2023-02-10 12:26:38 +00:00
Kayne Ruse
ee226ea426 Strengthened constness for cstrings and bytecode 2023-02-10 08:52:38 +00:00
Kayne Ruse
76a0290290 Removed export keyword from README.md 2023-02-09 17:46:28 +00:00
Kayne Ruse
e946a5f071 Patched segault in parser 2023-02-09 12:37:18 +00:00
Kayne Ruse
fc67d6a18b Fixed a segfault 2023-02-09 08:24:16 +00:00
Kayne Ruse
60908c8bf3 Added panic state to Toy_Compiler to catch a certain condition 2023-02-09 07:58:55 +00:00
Kayne Ruse
b8e3324acb tweak 2023-02-07 18:32:59 +00:00
Kayne Ruse
0fc8183799 Added _reduce 2023-02-06 09:46:20 +00:00
Kayne Ruse
0d7e4db661 Fixed repl bug 2023-02-06 04:47:30 +00:00
Kayne Ruse
c875ae7a0e Added _forEach and _map, added tests for them 2023-02-06 00:51:07 +00:00
Kayne Ruse
c0ec5ef28e Tested _concat() with clashing dict keys 2023-02-05 22:46:00 +00:00
Kayne Ruse
3088c4fe6d Implemented _concat 2023-02-05 20:45:31 +00:00
Kayne Ruse
9bd0cd23e7 Imported an example file for bytecode size testing, see #21 2023-02-05 15:40:17 +00:00
Kayne Ruse
60225b733b Added _getKeys() and _getValues() 2023-02-05 12:49:12 +00:00
Kayne Ruse
7b26527e95 Nesting index multiplication assignment fixed
This affects all arithmetic types applied to inner-nested compounds.
2023-02-05 06:28:24 +00:00
Kayne Ruse
386201b6e9 Added fib-memo.toy, fixed bugs until it worked 2023-02-04 17:01:58 +00:00
Kayne Ruse
fcd1cdf70b Added a few characters that can be escaped 2023-01-31 12:37:18 +00:00
Kayne Ruse
ae1dc5841e Added ternary operator, resolved #46 2023-01-14 10:24:15 +00:00
Kayne Ruse
8009f410a4 Added mustfail test, fixed compound type decl bug 2023-01-08 12:43:25 +00:00
Kayne Ruse
584fb115b6 Fixed the awful rule110 implementation 2022-11-28 16:48:45 +00:00
Kayne Ruse
fa20763c07 Corrected negative timers 2022-11-12 11:30:24 +00:00
Kayne Ruse
2c143a8be5 Moved tests from scripts/ to test/scripts/ 2022-11-11 14:51:47 +00:00
Kayne Ruse
0aa6e4063b Spotted a scope issue in the test 2022-11-08 20:22:20 +00:00
Kayne Ruse
ec39f099ca Wrote failing TDD test for timer library, not enabled 2022-11-08 19:40:21 +00:00
Kayne Ruse
0c8e036de8 Added vscode syntax highlighting under /tools 2022-11-07 09:44:26 +00:00