Implement the following plan: Plan: Add to_bytes built-in function Files to modify -…
Jump to turn (8)
- 1Implement the following plan: Plan: Add tobytes built-in function Files to modif
- 2commit /commit
- 3Smart Commit with Gitmoji Execute the following steps non-interactively: Branch
- 4[Request interrupted by user]
- 5coderabbit:review /coderabbit:review
- 6CodeRabbit Code Review Run an AI-powered code review using CodeRabbit. Context C
- 7commit /commit
- 8Smart Commit with Gitmoji Execute the following steps non-interactively: Branch
- User
Implement the following plan:
Plan: Add
to_bytesbuilt-in functionFiles to modify
runtime/meowrt/builtins.go(after line 99): AddToBytes(v Value) Value— assert*String, convert to[]byte, wrap each asNewInt, returnNewListpkg/checker/checker.go(line 824 switch): Addcase "to_bytes": return types.ListType{Elem: types.IntType{}}pkg/codegen/codegen.go(line 750-773): Add"to_bytes"to case list,builtinNamesmap ("ToBytes"), andbuiltinRetTypesmappkg/interpreter/interpreter.go(line 426 switch): Addcase "to_bytes": requireArgs(..., 1); return meowrt.ToBytes(args[0]), true