fix: Phase 3 — #25,28,29,41 token/AST/parser cleanup
Files modified (4): compiler/token/token.go — #25: Replace hand-rolled itoa with strconv.Itoa Fixes math.MinInt overflow bug in original implementation compiler/ast/ast.go — #29: Fix VarDecl.End() returning last var position Was returning Pos() (useless span info) compiler/parser/stmtreg.go — #28: Eliminate all 7 token array mutations rewriteAsIdent() modifies p.current only, not the token array Prevents backtracking corruption and improves safety compiler/lexer/lexer.go — Already clean from Phase 2 Issues resolved: #25 (MEDIUM), #28 (MEDIUM), #29 (MEDIUM), #41 partial (LOW) Total fixed: 29/53 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "2.0",
|
||||
"lastUpdated": "2026-04-01T02:46:45.142Z",
|
||||
"lastUpdated": "2026-04-01T02:57:07.253Z",
|
||||
"activeFeatures": [
|
||||
"hbrt",
|
||||
"hbrtl",
|
||||
@@ -72,7 +72,7 @@
|
||||
"documents": {},
|
||||
"timestamps": {
|
||||
"started": "2026-03-27T11:22:43.083Z",
|
||||
"lastUpdated": "2026-03-30T15:57:05.054Z"
|
||||
"lastUpdated": "2026-04-01T02:53:26.889Z"
|
||||
},
|
||||
"lastFile": "/mnt/d/charles/five/compiler/token/token.go"
|
||||
},
|
||||
@@ -98,7 +98,7 @@
|
||||
"documents": {},
|
||||
"timestamps": {
|
||||
"started": "2026-03-27T11:34:07.187Z",
|
||||
"lastUpdated": "2026-03-30T15:47:26.151Z"
|
||||
"lastUpdated": "2026-04-01T02:53:52.639Z"
|
||||
},
|
||||
"lastFile": "/mnt/d/charles/five/compiler/ast/ast.go"
|
||||
},
|
||||
@@ -111,9 +111,9 @@
|
||||
"documents": {},
|
||||
"timestamps": {
|
||||
"started": "2026-03-27T11:38:35.393Z",
|
||||
"lastUpdated": "2026-04-01T01:28:45.794Z"
|
||||
"lastUpdated": "2026-04-01T02:57:07.253Z"
|
||||
},
|
||||
"lastFile": "/mnt/d/charles/five/compiler/parser/expr.go"
|
||||
"lastFile": "/mnt/d/charles/five/compiler/parser/stmtreg.go"
|
||||
},
|
||||
"gengo": {
|
||||
"phase": "do",
|
||||
@@ -280,7 +280,7 @@
|
||||
"session": {
|
||||
"startedAt": "2026-03-27T06:06:49.620Z",
|
||||
"onboardingCompleted": false,
|
||||
"lastActivity": "2026-04-01T02:46:45.142Z"
|
||||
"lastActivity": "2026-04-01T02:57:07.253Z"
|
||||
},
|
||||
"history": [
|
||||
{
|
||||
@@ -5694,6 +5694,78 @@
|
||||
"feature": "gengo",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:52:55.069Z",
|
||||
"feature": "token",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:53:11.673Z",
|
||||
"feature": "token",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:53:26.889Z",
|
||||
"feature": "token",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:53:52.639Z",
|
||||
"feature": "ast",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:54:30.018Z",
|
||||
"feature": "parser",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:55:12.388Z",
|
||||
"feature": "parser",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:55:24.710Z",
|
||||
"feature": "parser",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:55:38.650Z",
|
||||
"feature": "parser",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:55:52.312Z",
|
||||
"feature": "parser",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:56:06.938Z",
|
||||
"feature": "parser",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:56:42.883Z",
|
||||
"feature": "parser",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-04-01T02:57:07.253Z",
|
||||
"feature": "parser",
|
||||
"phase": "do",
|
||||
"action": "updated"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user