mirror of
https://github.com/maride/mexico.git
synced 2024-11-14 15:24:25 +00:00
21 lines
405 B
Go
21 lines
405 B
Go
|
package interpreter
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"log"
|
||
|
)
|
||
|
|
||
|
func (t *Tape) DebugPrintTape() {
|
||
|
log.Printf("Tape is currently %d cells big", len(t.cells))
|
||
|
for i, v := range t.cells {
|
||
|
fmt.Printf("Cell %d: %d (%c)\n", i, v, v)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (s * Stack) DebugPrintStack() {
|
||
|
log.Printf("Stack is currently %d entries big", len(s.values))
|
||
|
for i, v := range s.values {
|
||
|
fmt.Printf("Stack row %d: %d (%c)\n", i, v, v)
|
||
|
}
|
||
|
}
|