Commit Graph

8 Commits

Author SHA1 Message Date
Kayne Ruse
914ee6fcfa WIP: Fixed strings and scopes, still reworking impacted areas 2026-04-05 10:13:58 +10:00
Kayne Ruse
639250f028 WIP return keyword, read more
Functions are having issues with being copied around, especially
between buckets, leading to the scopes getting looped. The program gets
stuck in 'incrementRefCount()'.

It's past my time limit, so I'll keep working on it tomorrow with a
fresh mind.

All function stuff is still untested.

See #163
2025-02-17 19:10:24 +11:00
Kayne Ruse
02dfc996b4 Functions are successfully called, read more
Return keyword is not yet implemented.

Functions are untested.

See #163
2025-02-17 14:05:07 +11:00
Kayne Ruse
7a8c415b3f Functions are written, but not yet executed, untested 2025-02-10 20:17:53 +11:00
Kayne Ruse
7c054db9e6 Compiler now reuses existing strings in the data, read more
If a string exists in the data, instead of being written, the function
'emitCStringToData()' will instead return the address of the match
within the data section.

Then, I can search the jump table for that address, and use the existing
jump entry or append a new one.

Fixes #168
2025-02-08 17:27:47 +11:00
Kayne Ruse
e2a284d9ce Ensured parser is reading functions correctly, read more
Parameter lists are read manually, rather than delegating to
parsePrecedence, because that was causing issues.

function bodies are read as block-level statements, just like the entire
files.
2025-02-08 12:00:55 +11:00
Kayne Ruse
c646904407 replaced void* with unsigned char* everywhere 2025-02-08 00:53:23 +11:00
Kayne Ruse
470836a390 Renamed Toy_ModuleBuilder to Toy_ModuleCompiler
I also noticed that Toy_ModuleBundle isn't being used right now.
2025-02-08 00:23:19 +11:00