Commit Graph

397 Commits

Author SHA1 Message Date
Kayne Ruse
633df5f376 Tweaked example.toy 2022-08-13 16:34:07 +01:00
Kayne Ruse
74e2907f09 Fixed array/dictionary confusion 2022-08-13 16:31:11 +01:00
Kayne Ruse
3098d75d01 Caught some loose memory 2022-08-13 16:26:51 +01:00
Kayne Ruse
b80888a7bb Removed debugging output 2022-08-13 15:57:51 +01:00
Kayne Ruse
afad0d99cb I think var declarations are working correctly; no type checking yet 2022-08-13 15:57:30 +01:00
Kayne Ruse
55aa6eb273 The value is displaying correctly, but not the type 2022-08-12 17:27:57 +01:00
Kayne Ruse
7424a681d6 Fixed a segfault 2022-08-12 15:14:21 +01:00
Kayne Ruse
53f0996fd1 Types are being read into the variable declaration, not yet used 2022-08-12 15:06:41 +01:00
Kayne Ruse
998b913fc9 Got literal types represented correctly 2022-08-12 11:10:52 +01:00
Kayne Ruse
2f18989f25 Types now exist, but they're not being embedded into bytecode yet 2022-08-12 09:11:43 +01:00
Kayne Ruse
80b64cf21e Fixed division by zero bugs 2022-08-12 07:26:58 +01:00
Kayne Ruse
42e55c1db6 Added equality check for arrays and dictionaries - needs testing 2022-08-11 20:13:01 +01:00
Kayne Ruse
00812e7a73 pre-computed identifer hashes 2022-08-11 18:36:03 +01:00
Kayne Ruse
1430aefdf3 Bugfix when strings are unterminated 2022-08-11 14:01:33 +01:00
Kayne Ruse
46097000a8 Removed debug display 2022-08-11 13:50:24 +01:00
Kayne Ruse
5c93bf663a Tweaked string quotes 2022-08-11 13:45:13 +01:00
Kayne Ruse
32ac46d9a0 Fiddled with the .toy file 2022-08-11 12:05:04 +01:00
Kayne Ruse
52651c5f2c Tweaked dictionary hashing to not hash null keys 2022-08-11 11:38:27 +01:00
Kayne Ruse
603d9d2b06 Recursive arrays and dictionaries! 2022-08-11 09:24:13 +01:00
Kayne Ruse
380b7a3699 fixed a bug 2022-08-10 18:22:02 +01:00
Kayne Ruse
67f7b3e436 Arrays and dictionaries have been implemented, read more
The arrays and dictionaries are currently being printed out correctly,
afaik. This means I should be able to go back and work on the type
system, assuming nothing happens.
2022-08-10 17:42:04 +01:00
Kayne Ruse
6a883bde96 Parser is reading variable declarations, read more
This is an incomplete process. It's supposed to be robust enough to
support the types of arrays and dictionaries, but arrays and
dictionaries aren't implemented in the literals yet, so that's my next
task.

I'll come back to variable declarations later.
2022-08-10 11:01:32 +01:00
Kayne Ruse
9603baeb0a Added console colors, tweaked help menu 2022-08-09 13:51:03 +01:00
Kayne Ruse
6d5549fc8e Added scopes using '{}' symbols, read more
I've also added a new literal type called 'identifier'. This will be
used for variable names, and has a type mask embedded in it.
2022-08-08 15:02:12 +01:00
Kayne Ruse
08ce270e06 Minor tweak to header loading 2022-08-08 10:35:41 +01:00
Kayne Ruse
cf8b3975c0 Tinkering with the repl 2022-08-08 09:39:40 +01:00
Kayne Ruse
6f4bfc0e10 Implemented and tested literal dictionary 2022-08-08 07:58:30 +01:00
Kayne Ruse
3fb952e3c2 Minor tweaks 2022-08-08 03:42:48 +01:00
Kayne Ruse
ceeca9d40f Fiddling with -Wpedantic 2022-08-07 21:39:21 +01:00
Kayne Ruse
3b89e216cc Fixed an non-optimized grouping bug 2022-08-07 16:46:54 +01:00
Kayne Ruse
072d9c59cc Fixed readme 2022-08-07 15:09:06 +01:00
Kayne Ruse
9a415738d9 Implemented groupings 2022-08-07 15:04:19 +01:00
Kayne Ruse
d7fda480fd Added assert keyword, with re-routable print and assert outputs 2022-08-07 12:26:04 +01:00
Kayne Ruse
7ff232c814 Removed a trace statement 2022-08-06 14:52:59 +01:00
Kayne Ruse
a05b93975e Basic arithmetic works 2022-08-06 14:50:22 +01:00
Kayne Ruse
c178824a0a Forgot a function call 2022-08-06 08:22:09 +01:00
Kayne Ruse
3cdf77b85c Repl working 2022-08-06 08:16:54 +01:00
Kayne Ruse
7a3986af33 Wrote the interpreter 2022-08-06 07:58:32 +01:00
Kayne Ruse
0048c92cf5 Adjusted some includes 2022-08-06 06:16:14 +01:00
Kayne Ruse
6b33895f75 Added optimisation levels 2022-08-06 05:59:29 +01:00
Kayne Ruse
577d1965cb Fixed a missing string terminator 2022-08-05 17:14:33 +01:00
Kayne Ruse
bfaf4e83bb Fixed a string comparison bug 2022-08-05 17:11:21 +01:00
Kayne Ruse
8f2ba5cd50 Tested long literals, fixed a dissection bug 2022-08-05 16:47:09 +01:00
Kayne Ruse
cd05d5d84a Got the compiler partially working 2022-08-05 16:29:12 +01:00
Kayne Ruse
1ff32fe101 Lexer partially working 2022-08-03 14:06:54 +01:00
Kayne Ruse
3cad70dddd Wrote a basic lexer 2022-08-03 09:35:20 +01:00
Kayne Ruse
3cbf7b13eb Initial commit 2022-08-03 07:39:50 +01:00