Kayne Ruse
3ab18c7b14
Fixed nagging issues, read more
...
* A segfault from the inspector
* multiple returns no longer a goal
* Cleaned up the 'URGENT' comment tags
* Narrowed down what is needed for alpha
2026-05-15 14:13:54 +10:00
Kayne Ruse
1660dc8b53
Added a basic landing page for the website
2026-05-15 09:22:30 +10:00
Kayne Ruse
b3f427d80d
Set up a basic website in 'docs' using mdbook
2026-05-15 08:44:28 +10:00
Kayne Ruse
6901b9a6c9
Opaque values can be referenced
2026-05-13 17:54:24 +10:00
Kayne Ruse
c9d4b9965c
Added function invoke in RHS values
...
Return also supports chained expressions.
2026-05-13 17:32:05 +10:00
Kayne Ruse
ff1ef1352a
Reviewed and updated tagged comments
2026-05-13 10:56:40 +10:00
Kayne Ruse
53d3606c7e
Found and fixed some obscure leaks in 'Toy_Scope'
2026-05-10 17:35:07 +10:00
Kayne Ruse
83fb5222a2
Found and fixed a memory leak in the rope strings
...
Also fixed a bit manipulation error in the GC.
2026-05-10 15:45:16 +10:00
Kayne Ruse
3b813da1cf
Zero the bucket's memory
...
Windows doesn't do this automatically.
2026-05-09 13:00:06 +10:00
Kayne Ruse
8b9b012bcc
Fixed a memory leak
2026-05-08 17:23:36 +10:00
Kayne Ruse
6c055a0435
Implemented garbage collection
...
As a whole, this is still tentative.
2026-05-08 16:28:12 +10:00
Kayne Ruse
be84a8dfe2
Tweaked output callbacks to match 'puts' signature
2026-05-08 11:12:27 +10:00
Kayne Ruse
185f3896c5
Fixed API naming convention
...
Anything prepended with TOY_API is 'public'.
Anything that starts with Toy_private_* shouldn't be touched.
2026-05-06 16:12:50 +10:00
Kayne Ruse
60a0fe8907
Added opaque attributes to API
2026-05-06 16:02:27 +10:00
Kayne Ruse
7cdb81e0bf
Fixed a repl util error case
2026-05-01 20:51:32 +10:00
Kayne Ruse
18a4b33c4e
Enabled the opaque value type
...
Also improved a couple error messages.
2026-05-01 18:42:51 +10:00
Kayne Ruse
eb33775314
FIX: compounds assigned to themselves would cause self-references
2026-04-28 09:23:43 +10:00
Kayne Ruse
617a658de0
Added the preview image, so I don't lose it
2026-04-27 14:33:12 +10:00
Kayne Ruse
6ebbcc45a3
Tweaked build paths
2026-04-27 10:07:16 +10:00
Kayne Ruse
b718b35097
FIX: Substrings had corner-cases with incorrect results, read more
...
I found this while writing unit tests for Toy_Function, where one
(native) function was named 'identity' and another (custom) was named
'ident' to avoid a naming clash. The rename didn't resolve the clash, so
after some digging, I found that strings compared to substrings would
return a match, despite being different.
This took some awkward corner-case handling, as it turns out
'deepCompareUtil' only returns zero when no differences have been found,
not when a match has been found. I also added checks for this to
Toy_String's unit test, with the parameters checked in both orders i.e.
(a,b) and (b,a), because paranoia is your friend.
The rope pattern is powerful, but also gives you enough rope to hang
yourself.
2026-04-26 22:52:24 +10:00
Kayne Ruse
af30246e0c
Implemented array.forEach(fn)
2026-04-26 11:59:15 +10:00
Kayne Ruse
efc9fe1406
Tweaked stack allocation when inheriting VMs
2026-04-26 10:14:19 +10:00
Kayne Ruse
c9a34e2259
Corrected usage of 'Toy_allocateTable'
2026-04-26 09:55:11 +10:00
Kayne Ruse
0c24a7609e
Added the following attributes:
...
* table.length
* table.insert(key,value)
* table.hasKey(key)
* table.remove(key)
There's basically only iteration and sorting left.
2026-04-24 23:01:57 +10:00
Kayne Ruse
88e9794952
Implemented the following attributes:
...
* String.length
* String.asUpper
* String.asLower
* array.length
* array.pushBack(x)
* array.popBack()
The remaining attributes are listed in 'toy_attributes.h'
2026-04-24 17:33:10 +10:00
Kayne Ruse
b589392b9e
Comment tweaks
2026-04-24 13:01:38 +10:00
Kayne Ruse
21819b2d62
Capitalized type names
2026-04-24 12:46:27 +10:00
Kayne Ruse
4aec343b6c
BUGFIX: scopes weren't expanding as intended
2026-04-24 12:46:05 +10:00
Kayne Ruse
9a75226491
Implemented the attribute operator, using a period
2026-04-24 11:31:54 +10:00
Kayne Ruse
d2ac1eeb8e
Syntax fix
2026-04-23 11:09:25 +10:00
Kayne Ruse
f8596806ee
Attempting a fix for macOS builds
2026-04-23 11:02:25 +10:00
Kayne Ruse
4957536e23
When in doubt, typecast
2026-04-23 10:45:06 +10:00
Kayne Ruse
5a867ac627
Fixed some 'size_t' issues and a bug caught on a different platform
2026-04-23 10:40:00 +10:00
Kayne Ruse
991d29e3e6
Enabled CI for other supported platforms
2026-04-23 10:10:58 +10:00
Kayne Ruse
accb7f9fb4
Started work on an AST inspector
2026-04-22 15:57:55 +10:00
Kayne Ruse
63dfd33e5e
Added arrays and tables to the bytecode inspector
...
Currently searching for an issue related to compounds.
2026-04-22 14:31:17 +10:00
Kayne Ruse
9bb115f732
Disabled bloated and verbose testing output
2026-04-22 13:06:14 +10:00
Kayne Ruse
8875b6968b
Updated VM unit tests
2026-04-22 12:53:02 +10:00
Kayne Ruse
97d16c1184
Updated compiler unit tests
2026-04-22 12:07:40 +10:00
Kayne Ruse
47c5d49069
Updated parser unit test, fixed a missing stack pop for binary exprStmt
2026-04-22 11:40:53 +10:00
Kayne Ruse
2c92f829e1
Fixed stack overflow caused by expression statements
...
This is a longstanding bug, so I'm glad its fixed, even if its only a
bandaid.
This does break some tests, but I'm too tired and these tests are out of
date.
2026-04-17 23:43:30 +10:00
Kayne Ruse
5b101d763e
Expanded bytecode inspector, added functions to Toy_copyValue
2026-04-17 11:55:46 +10:00
Kayne Ruse
81c95ff69d
Cleared out some unneeded notes
2026-04-17 09:25:18 +10:00
Kayne Ruse
88100b128a
Implemented native C functions called from Toy scripts
...
There's only example functions for now, but I'll add type-specific
functions later.
2026-04-16 21:14:42 +10:00
Kayne Ruse
3a0f11ebb4
Added string type check
2026-04-16 19:30:23 +10:00
Kayne Ruse
f9790b99ce
Moved type coersion check, functions can be compared
...
Also updated some tagged comments
2026-04-15 15:04:54 +10:00
Kayne Ruse
dde52f9d8a
Workflow tinkering
2026-04-15 14:17:32 +10:00
Kayne Ruse
cda4bee6ee
Double-checked strncpy doesn't have bugs
...
Apparently the linux kernel removed strncpy entirely.
2026-04-13 12:09:09 +10:00
Kayne Ruse
9a10fadada
Tweaked CI
2026-04-12 23:15:56 +10:00
Kayne Ruse
8eefbc8a0c
Added remaining opcodes to inspector
...
Also used some coloring for terminal outputs
2026-04-12 23:04:31 +10:00