feat: Prepare for code modularization and cleanup
- Archive old documentation and test files to `docs/archive/` and `local_tests/`. - Remove various temporary and old files from the project root. - Add `nekocode-rust` analysis tool and its output files (`nekocode/`, `.nekocode_sessions/`, `analysis.json`). - Minor updates to `apps/chip8_nyash/chip8_emulator.nyash` and `local_tests` files. This commit cleans up the repository and sets the stage for further code modularization efforts, particularly in the `src/interpreter` and `src/parser` modules, based on recent analysis.
This commit is contained in:
32
local_tests/test_delegation_basic.nyash
Normal file
32
local_tests/test_delegation_basic.nyash
Normal file
@ -0,0 +1,32 @@
|
||||
box Parent {
|
||||
init { name }
|
||||
|
||||
pack(n) {
|
||||
me.name = n
|
||||
}
|
||||
|
||||
greet() {
|
||||
return "Hello " + me.name
|
||||
}
|
||||
}
|
||||
|
||||
box Child from Parent {
|
||||
init { age }
|
||||
|
||||
pack(n, a) {
|
||||
from Parent.pack(n)
|
||||
me.age = a
|
||||
}
|
||||
|
||||
override greet() {
|
||||
local base = from Parent.greet()
|
||||
return base + " (age " + me.age + ")"
|
||||
}
|
||||
}
|
||||
|
||||
static box Main {
|
||||
main() {
|
||||
local c = new Child("Alice", 25)
|
||||
return c.greet()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user