Commit Graph

51 Commits

Author SHA1 Message Date
Kayne Ruse
4dcc05e796 Corrected fnv1 hash algorithm 2022-11-08 19:36:54 +00:00
Kayne Ruse
ca24c4f211 Added the opaque data type 2022-10-03 21:02:13 +01:00
Kayne Ruse
7eb16e51bb Changed how string/identifier lengths are determined in copyLiteral 2022-09-15 16:36:42 +01:00
Kayne Ruse
0f6be5ead7 Can no longer use functions as dictionary keys 2022-09-11 13:36:59 +01:00
Kayne Ruse
a0ea0f7f31 More subtle bugfixes 2022-09-08 05:42:39 +01:00
Kayne Ruse
6c71a16e3e Fixed type variable evaluation, it now occurs at var definition 2022-09-07 14:21:40 +01:00
Kayne Ruse
2aecf6e8a1 Implemented typeof and added resetInterpreter() 2022-09-05 10:56:35 +01:00
Kayne Ruse
6787cfff55 Tested matrix manipulation 2022-09-04 10:27:16 +01:00
Kayne Ruse
6c151e21b0 tired 2022-09-03 06:58:50 +10:00
Kayne Ruse
c58c8911fe Going well tonight - need a break 2022-09-03 00:51:55 +10:00
Kayne Ruse
1f6b3e232d I feel like there's just a few bugs left 2022-09-02 05:47:48 +10:00
Kayne Ruse
90d18c7520 fixed the fix 2022-09-02 04:03:40 +10:00
Kayne Ruse
ea3ca2751c Fixed failing printing of compound types 2022-09-01 18:56:28 +01:00
Kayne Ruse
3a4017cea5 Lots of runtime errors 2022-08-30 12:09:11 +10:00
Kayne Ruse
1c6c7e5d4f I GIVE UP 2022-08-29 21:38:54 +10:00
Kayne Ruse
1937d727bb Working on refactoring, read more
The main program segfaults, but right now I'm working on the tests, mainly.
2022-08-29 10:21:25 +10:00
Kayne Ruse
f705d82aee Wrote some small tests 2022-08-28 09:35:46 +01:00
Kayne Ruse
3355c3a4c2 Forgot printing native functions 2022-08-27 15:41:21 +01:00
Kayne Ruse
90e5a5d08b Rest parameter working 2022-08-27 11:59:54 +01:00
Kayne Ruse
041fe99e01 Function declaration seems to work 2022-08-25 15:19:08 +01:00
Kayne Ruse
08e2adab50 #15 Fixed some of the worst memory leaks 2022-08-22 20:51:09 +01:00
Kayne Ruse
45920f763c Tweaked error messages 2022-08-22 05:17:17 +01:00
Kayne Ruse
9ac16f8e80 Comment tweaks 2022-08-22 02:16:24 +01:00
Kayne Ruse
df6bd58b1a Types are first-class citizens 2022-08-22 01:59:29 +01:00
Kayne Ruse
9c995830e2 Resolved #14 2022-08-21 00:51:28 +01:00
Kayne Ruse
dc1914b9ed Resolved #13 2022-08-21 00:36:05 +01:00
Kayne Ruse
c64d451287 Added string concatenation 2022-08-20 22:58:50 +01:00
Kayne Ruse
80ccd119ff Changed truthiness 2022-08-20 22:43:44 +01:00
Kayne Ruse
8309535bbe Fixed negation issue, moved some scripts to test/ 2022-08-20 07:20:29 +01:00
Kayne Ruse
4f0aebc32f Type casting is working: 2022-08-19 19:24:07 +01:00
Kayne Ruse
574a864dd0 Reworked the type system, types now have a single value 2022-08-17 17:39:33 +01:00
Kayne Ruse
3098d75d01 Caught some loose memory 2022-08-13 16:26: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
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
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
5c93bf663a Tweaked string quotes 2022-08-11 13:45:13 +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
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
6f4bfc0e10 Implemented and tested literal dictionary 2022-08-08 07:58:30 +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
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
577d1965cb Fixed a missing string terminator 2022-08-05 17:14:33 +01:00