colourise the terminal

This commit is contained in:
2023-03-08 19:04:53 +00:00
parent 11ed803601
commit f7603e30c4
18 changed files with 373 additions and 76 deletions

View File

@@ -54,12 +54,15 @@ func runVal(line any, stack stack) (any, ArErr) {
}
// returns error
func run(translated []any, stack stack) (any, ArErr) {
func run(translated []any, stack stack) (any, ArErr, int, any) {
var output any = nil
count := 0
for _, val := range translated {
_, err := runVal(val, stack)
val, err := runVal(val, stack)
output = val
if err.EXISTS {
return nil, err
return nil, err, count, output
}
}
return nil, ArErr{}
return nil, ArErr{}, count, output
}