Switched to a new branch 'feature/try-catch-error-handling'
package ast

import (
	"fmt"
	"reflect"
	"regexp"
)

func Dump(node Node) string {
	return dump(reflect.ValueOf(node), "")
}

func dump(v reflect.Value, ident string) string {
	if !v.IsValid() {
		return "nil"
	}
	t := v.Type()
	switch t.Kind() {
	case reflect.Struct:
		out := t.Name() + "{\n"
		for i := 0; i < t.NumField(); i++ {
			f := t.Field(i)
			if isPrivate(f.Name) {
				continue
			}
			s := v.Field(i)
			out += fmt.Sprintf("%v%v: %v,\n", ident+"\t", f.Name, dump(s, ident+"\t"))
		}
		return out + ident + "}"
	case reflect.Slice:
