Kayne Ruse
813da3e1aa
WIP Adding for-loop to parser & compiler
2026-05-21 11:26:59 +10:00
Kayne Ruse
f55f27726c
Fixed invoking functions within function arguments
...
Somewhat similar to c9d4b9965c
2026-05-19 13:24:17 +10:00
Kayne Ruse
a0d75b3c70
Updated and revised some tests
2026-05-19 11:24:49 +10:00
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
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
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
21819b2d62
Capitalized type names
2026-04-24 12:46:27 +10:00
Kayne Ruse
9a75226491
Implemented the attribute operator, using a period
2026-04-24 11:31:54 +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
f9790b99ce
Moved type coersion check, functions can be compared
...
Also updated some tagged comments
2026-04-15 15:04:54 +10:00
Kayne Ruse
e24823924a
Comment tweaks
2026-04-12 15:02:07 +10:00
Kayne Ruse
c0c03a4110
Functions are working, tests incomplete
...
This required a massive cross-cutting rework to the scope system,
multiple subtle bugfixes and relearning of the parser internals, but it
does appear that functions are working correctly.
A few caveats: for now, parameters are always constant, regardless of
type, return values can't be specified, and some script tests have been
written.
Most importantly, a key feature is working: closures.
2026-04-12 11:52:58 +10:00
Kayne Ruse
66155fa213
Tweak, but I need a decompiler now
2026-04-10 16:19:03 +10:00
Kayne Ruse
09fc6d5279
Compiler test is passing
2026-04-07 20:36:58 +10:00
Kayne Ruse
48072f0dd1
AST test is passing
2026-04-07 20:06:44 +10:00
Kayne Ruse
57fe9bb00d
WIP: Compiles but still very broken
2026-04-05 17:04:30 +10:00