Kayne Ruse
f6ec6a8c73
The any type is now recognized as a type properly
2023-06-19 23:16:46 +10:00
Kayne Ruse
2157b2f540
Fixed an obscure compiler bug involving assignments and indexing, read more
...
TOY_OP_INDEX_ASSIGN_INTERMEDIATE was being used when it shouldn't have.
Now the check runs down the whole binary->right branch to ensure the given
node doesn't exist in that tree.
2023-06-15 12:29:25 +10:00
Kayne Ruse
1481216e69
Fixed chained functions, resolved #52
2023-06-14 17:41:30 +10:00
Kayne Ruse
f25f389b4e
Removed a macro that potentially broke the build
...
Gonna have to live with repl code in the lib for now.
2023-06-14 16:53:48 +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
Ratstail91
50d03e28fc
Fixed MSVC compilation
2023-06-12 00:05:24 +10:00
Kayne Ruse
763581c73b
Added header-only parsing to the repl, read more
...
Also:
* Ensured TOY_VERSION_BUILD is consistent throughout the whole build
* Updated README.md
2023-06-07 23:55:30 +10:00
Kayne Ruse
cdb2613e5d
Disallowed fn decl in for loop pre clause
2023-06-07 19:20:50 +10:00
Kayne Ruse
733df87c08
Added dist target, lowered recursion depth limit
2023-06-07 14:58:51 +10:00
Kayne Ruse
bfd506f497
Forgot memory allocator for reffunctions
2023-06-07 02:02:35 +10:00
Kayne Ruse
18b59c9e84
Bumped version number
2023-06-07 00:11:34 +10:00
Ratstail91
d3eb31d964
Added TOY_DISABLE_REPL option for compiling
2023-06-07 00:04:05 +10:00
Kayne Ruse
07f4a98b95
Replacing Toy_Literal function bytecode with Toy_RefFunction, addressing #77
...
This seems to have worked way too easily.
2023-06-06 23:35:59 +10:00
Kayne Ruse
bb81b8c474
Changed recursion limit to 10,000 (was 200)
2023-06-06 21:02:01 +10:00
Kayne Ruse
cf6db57787
Whitespace tweak
2023-03-25 01:43:51 +11:00
Kayne Ruse
17f0e4476b
Caught a bug that the test cases failed to find
2023-03-17 21:58:13 +11: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
Ratstail91
4b83f1f0d6
Fixed a dumb typo
2023-03-15 06:39:19 +11:00
Kayne Ruse
e2fa1cf2e8
Moved lib_runner's drive system into the core of the lang
2023-03-15 06:12:35 +11:00
Kayne Ruse
a04d2c4816
Tweaked TOY_EXPORT omitting extra repl stuff
2023-03-15 04:56:26 +11:00
Kayne Ruse
f2f8aed23a
Added short-circuiting support to && and ||
2023-03-11 17:59:09 +11:00
Kayne Ruse
68ed52b347
Tweaked precedence of binary expressions
2023-03-11 17:47:43 +11:00
Kayne Ruse
88dac53ae0
Added toy.h, thanks for the suggestion GabrielGavrilov!
...
Resolved #72
2023-03-10 08:41:58 +11:00
Kayne Ruse
f84cdff883
Fixed order of operations
2023-03-07 06:49:17 +11:00
Ratstail91
f869c9425a
Corrected an error message
2023-03-05 13:05:16 +11:00
Ratstail91
76ddd5703e
Hack: just track the intermediate depth externally
2023-03-05 00:24:07 +11:00
Ratstail91
669808730e
Minor tweak that shouldn't break anything
2023-03-04 22:57:41 +11:00
Ratstail91
e6d9809da5
Famous last words: I think I fixed it
2023-03-04 22:18:17 +11:00
Ratstail91
502032e514
Testing an obscure bugfix
2023-03-04 15:41:55 +11:00
Ratstail91
70ca27486e
Bugfix a leak?
2023-02-28 17:37:43 +11:00
Ratstail91
12fa434e0f
Experimenting with cleaning up loopy code
2023-02-28 17:29:37 +11:00
Kayne Ruse
c5c0122243
BUGFIX: typeof keyword precedence was off
2023-02-27 21:47:38 +11:00
Kayne Ruse
e243ad949a
Removed a divide instruction (modulo) from the final output, thanks Wren!
2023-02-26 22:41:58 +11:00
Ratstail91
9b673f23ad
Reduced C callstack size in Toy_Scope
2023-02-26 22:31:37 +11:00
Kayne Ruse
624a0c80ba
Prevented NO-OP calls to the memory allocator
...
Also shaved off about 1-2 milliseconds of execution time of fib-memo.toy
2023-02-26 21:20:22 +11:00
Ratstail91
1064b69d04
BUGFIX: Integer and float comparisons always return true
2023-02-26 01:27:21 +11:00
Ratstail91
3aeddff736
Tweaks to dictionary for performance
2023-02-24 22:13:50 +11:00
Kayne Ruse
1dde9d8f29
Improved error message in set() and push()
...
The actual issue was that the type check wasn't catching the issue, so
it reached the scope before it was caught. Fixed it, anyway.
2023-02-20 13:04:35 +00:00
Kayne Ruse
7f0f17b6e0
Patched up failures from Toy_parseIdentifierToValue
...
I really don't like that function - it needs to be replaced.
2023-02-20 06:11:30 +00:00
Kayne Ruse
3507104121
Fixed indexAccess potentially going awry with bad inputs
...
There's always one or two that slip through
2023-02-20 05:28:25 +00:00
Kayne Ruse
87de634e30
Updated version number to 1.0.0
2023-02-20 02:08:42 +00:00
Kayne Ruse
6fa224fa7b
Hooks can't be dict keys, tweaked Toy_readFile
2023-02-18 16:47:38 +00:00
Kayne Ruse
8a68d864e6
Opaque type check added
2023-02-18 15:21:49 +00:00
Kayne Ruse
49f240ea07
Minor tweak
2023-02-18 12:15:23 +00:00
Kayne Ruse
6f126e6daa
Minor tweaks and renames, as I'm documenting
2023-02-18 11:56:18 +00:00
Kayne Ruse
1668dca255
Tweaked some APIs, hid some functions I don't want in the API
2023-02-16 13:06:07 +00:00
Kayne Ruse
cdae03bd54
String and identifier making fixed for MSVC, just in case
2023-02-14 17:38:10 +00:00
Kayne Ruse
7b501b71b5
commandLine now initializes with default values
2023-02-14 17:00:16 +00:00
Kayne Ruse
453afbab41
Fixed a stupid bug in MSVC
2023-02-14 10:24:43 +00:00