feat: Value type methods — chain calls on String/Array/Numeric/Hash

Built-in methods on basic types, enabling fluent chaining:
  cStr:Trim():Upper():Left(5)    → "HELLO"
  aArr:Sort():Join(",")          → "1,2,3"

String (20 methods):
  Upper, Lower, Trim, LTrim, RTrim, Left, Right, Substr,
  Len, Replace, Split, Contains, Starts, Ends, Reverse,
  Replicate, Copy, At, Empty, Val

Array (14 methods):
  Len, Push, Pop, Sort, Find, Map, Filter, Each,
  Join, Copy, Empty, First, Last, Slice

Numeric (6 methods):
  Str, Round, Int, Abs, Sqrt, Copy

Hash (7 methods):
  Keys, Values, Has, Len, Copy, Delete, Empty

Any type (5 methods):
  Copy, Type, IsNil, ToStr, ClassName

Integration: Thread.Send() checks SendBuiltin() before class dispatch.
Tests: 28 tests ALL PASS including chaining test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 12:32:36 +09:00
parent 8da77b623a
commit 99f0ef2152
4 changed files with 849 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"version": "2.0",
"lastUpdated": "2026-04-01T12:09:42.812Z",
"lastUpdated": "2026-04-02T03:31:23.903Z",
"activeFeatures": [
"hbrt",
"hbrtl",
@@ -33,9 +33,9 @@
"documents": {},
"timestamps": {
"started": "2026-03-27T09:33:04.512Z",
"lastUpdated": "2026-04-01T12:08:54.344Z"
"lastUpdated": "2026-04-02T03:31:23.903Z"
},
"lastFile": "/mnt/d/charles/five/hbrt/frb.go"
"lastFile": "/mnt/d/charles/five/hbrt/valuemethods_test.go"
},
"hbrtl": {
"phase": "do",
@@ -280,7 +280,7 @@
"session": {
"startedAt": "2026-03-27T06:06:49.620Z",
"onboardingCompleted": false,
"lastActivity": "2026-04-01T12:09:42.812Z"
"lastActivity": "2026-04-02T03:31:23.903Z"
},
"history": [
{
@@ -5880,6 +5880,24 @@
"feature": "five",
"phase": "do",
"action": "updated"
},
{
"timestamp": "2026-04-02T03:29:33.962Z",
"feature": "hbrt",
"phase": "do",
"action": "updated"
},
{
"timestamp": "2026-04-02T03:30:25.427Z",
"feature": "hbrt",
"phase": "do",
"action": "updated"
},
{
"timestamp": "2026-04-02T03:31:23.903Z",
"feature": "hbrt",
"phase": "do",
"action": "updated"
}
]
}