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:
Moe Charm
2025-08-16 01:30:39 +09:00
parent 87d776f3e7
commit ef7a0de3b0
200 changed files with 229443 additions and 26533 deletions

View File

@ -0,0 +1,51 @@
# Diamond Problem - 状態変更の重複実行テスト
print("=== Diamond State Problem Test ===")
# カウンター付きStringBox拡張
box CounterString from StringBox {
init { counter }
birth(content) {
from StringBox.birth(content)
me.counter = 0
print("CounterString.birth: counter = " + me.counter)
}
override toString() {
me.counter = me.counter + 1 # ← 呼び出されるたびにカウントアップ
print("CounterString.toString called: counter = " + me.counter)
return "Counter[" + me.counter + "]: " + from StringBox.toString()
}
}
# Diamond Problem - 状態変更が重複する
box DoubleProblem from CounterString, StringBox {
init { prob_data }
birth(content) {
from CounterString.birth(content)
me.prob_data = "problem"
print("DoubleProblem.birth called")
}
override toString() {
print("DoubleProblem.toString called")
# 同じCounterStringのcounterが2回増える
local a = from CounterString.toString() # counter++
local b = from StringBox.toString() # 別のStringBox
return "Double[" + a + " | " + b + "]"
}
}
# テスト実行
print("\n--- Creating instance ---")
local prob = new DoubleProblem("test")
print("\n--- First toString call ---")
print(prob.toString())
print("\n--- Second toString call ---")
print(prob.toString())
print("\n=== Test completed ===")