reorganized Eval() return errors and call EvalItem() on each item

This commit is contained in:
2023-12-08 18:35:56 +01:00
parent cb774b3b80
commit ac9d08d6fc
3 changed files with 123 additions and 99 deletions

View File

@@ -71,3 +71,7 @@ func const2num(name string) float64 {
func list2str(list Numbers) string {
return strings.Trim(strings.Join(strings.Fields(fmt.Sprint(list)), " "), "[]")
}
func Error(m string) error {
return fmt.Errorf("Error: %s!", m)
}