Commit Graph

104 Commits

Author SHA1 Message Date
Kayne Ruse
90b504d3a4 No segfaults, still failing tests 2022-09-01 14:00:31 +10: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
5300e2ceec Gonna start unit testing to resolve issues 2022-08-28 07:03:12 +01:00
Kayne Ruse
9c766ec61e Working on memory issues 2022-08-28 01:35:00 +01:00
Kayne Ruse
ec91bac8a5 Native functions are working 2022-08-27 15:39:42 +01:00
Kayne Ruse
e523a6f60a Interpreter adopts inner interpreter panic state on assert failure 2022-08-27 12:07:41 +01:00
Kayne Ruse
90e5a5d08b Rest parameter working 2022-08-27 11:59:54 +01:00
Kayne Ruse
7bd67765aa Functions take a set number of arguments 2022-08-26 12:48:10 +01:00
Kayne Ruse
f36289786e Fixed a repl bug 2022-08-26 11:59:09 +01:00
Kayne Ruse
ffc50ceafb Closures work 2022-08-26 03:54:58 +01:00
Kayne Ruse
0c67ce6476 Stopgap limit on return count 2022-08-26 02:14:05 +01:00
Kayne Ruse
a4f1e048e9 Function calls, with args and single returns are working 2022-08-26 01:48:26 +01:00
Kayne Ruse
041fe99e01 Function declaration seems to work 2022-08-25 15:19:08 +01:00
Kayne Ruse
4f70bea808 Implemented logical && and || 2022-08-23 05:07:17 +01:00
Kayne Ruse
6939b216a9 Added arithmetic assign operators 2022-08-23 03:33:28 +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
b385b461e0 Increment and decrement operators work 2022-08-21 00:23:09 +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
18c5fb6add Break and continue keywords are working 2022-08-20 20:08:22 +01:00
Kayne Ruse
daceaa5492 Found a weird bug, reporting it 2022-08-20 13:44:55 +01:00
Kayne Ruse
975ed41d14 If-then-else is working with jump statements 2022-08-20 12:38:29 +01:00
Kayne Ruse
8309535bbe Fixed negation issue, moved some scripts to test/ 2022-08-20 07:20:29 +01:00
Kayne Ruse
2bf721867b Comparions and the ! operator work 2022-08-20 06:20:20 +01:00
Kayne Ruse
596a4882bc Fixed a print bug with casting 2022-08-19 19:53:55 +01:00
Kayne Ruse
4f0aebc32f Type casting is working: 2022-08-19 19:24:07 +01:00
Kayne Ruse
16291bd1af Declare variables with a type but no value allowed 2022-08-19 17:52:24 +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
7e01ead6ff Fixed some issues in scope 2022-08-15 10:15:24 +01:00
Kayne Ruse
6b834ca6d1 Type checking in place 2022-08-15 03:52:44 +01:00
Kayne Ruse
8d12db7dbe Some declaration guards 2022-08-15 03:12:10 +01:00
Kayne Ruse
4aa6f75ea7 Expression statements and assignemnts are working 2022-08-14 19:57:24 +01:00
Kayne Ruse
e9ab6f3f96 Variables now persist between statements 2022-08-13 21:27:39 +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
55aa6eb273 The value is displaying correctly, but not the type 2022-08-12 17:27:57 +01:00
Kayne Ruse
80b64cf21e Fixed division by zero bugs 2022-08-12 07:26:58 +01:00
Kayne Ruse
00812e7a73 pre-computed identifer hashes 2022-08-11 18:36:03 +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
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
ceeca9d40f Fiddling with -Wpedantic 2022-08-07 21:39:21 +01:00
Kayne Ruse
9a415738d9 Implemented groupings 2022-08-07 15:04:19 +01:00