// String implementes fmt.Stringer (and runtime.stringer)
320415
func (d Device) String() string {
	if d == CPU {
		return "CPU"
	}
	if d < 0 {
		return "Invalid Device"
	}
	return fmt.Sprintf("GPU(%d)", int(d))
}
974027
func (c *ContextError) String() string {
	return fmt.Sprintf("(%d) %s", c.Code, c.Err)
}
147665
func (r *Application) String() string {
	s, err := json.MarshalIndent(r, "", "  ")
	if err != nil {
		return fmt.Sprintf(`{"error": "error decoding type into json: %s"}`, err)
	}

	return string(s)
}
381918
func (r *result) String() string {
	buf := &bytes.Buffer{}

	fmt.Fprintln(buf, "=== RUN", r.name)
	if r.passed {
		fmt.Fprintf(buf, "--- PASS: %s (%s)", r.name, r.duration)
	} else {
		// fmt.Fprintln(buf, "    CMD:", r.cmd)
		fmt.Fprintf(buf, strings.Join(r.output, "\n"))
		fmt.Fprintf(buf, "--- FAIL: %s (%s)", r.name, r.duration)
	}

	return buf.String()
}
257749
func (ran *Range) String() string {
	lowStrs := make([]string, 0, len(ran.LowVal))
	for _, d := range ran.LowVal {
		lowStrs = append(lowStrs, formatDatum(d, true))
	}
	highStrs := make([]string, 0, len(ran.LowVal))
	for _, d := range ran.HighVal {
		highStrs = append(highStrs, formatDatum(d, false))
	}
	l, r := "[", "]"
	if ran.LowExclude {
		l = "("
	}
	if ran.HighExclude {
		r = ")"
	}
	return l + strings.Join(lowStrs, " ") + "," + strings.Join(highStrs, " ") + r
}
481516
func (c Case) String() string {
	return fmt.Sprintf("%s%d [%s, %s]: %s(%s) = %s %s",
		c.Prefix, c.Prec, c.Trap, c.Mode, c.Op,
		join(c.Inputs, ", ", -1), c.Output, c.Excep)
}
163201
func (i Extend) String() string {
	switch i {
	case ExtendNone:
		return "ExtendNone"
	case ExtendRepeat:
		return "ExtendRepeat"
	case ExtendReflect:
		return "ExtendReflect"
	case ExtendPad:
		return "ExtendPad"
	default:
		return fmt.Sprintf("Extend(%d)", i)
	}
}
983014
func (v *CrazyNesting) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [4]string
	i := 0
	if v.StringField != nil {
		fields[i] = fmt.Sprintf("StringField: %v", *(v.StringField))
		i++
	}
	if v.SetField != nil {
		fields[i] = fmt.Sprintf("SetField: %v", v.SetField)
		i++
	}
	fields[i] = fmt.Sprintf("ListField: %v", v.ListField)
	i++
	if v.BinaryField != nil {
		fields[i] = fmt.Sprintf("BinaryField: %v", v.BinaryField)
		i++
	}

	return fmt.Sprintf("CrazyNesting{%v}", strings.Join(fields[:i], ", "))
}
1069988
func (v *Argument) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [2]string
	i := 0
	fields[i] = fmt.Sprintf("Name: %v", v.Name)
	i++
	fields[i] = fmt.Sprintf("Type: %v", v.Type)
	i++

	return fmt.Sprintf("Argument{%v}", strings.Join(fields[:i], ", "))
}
207003
func (this Map) String() string {
	wr := bytes.NewBuffer(nil)
	fmt.Fprint(wr, "Map[")
	for k, v := range this {
		fmt.Fprintf(wr, "%v: %v", k, print(v))
	}
	fmt.Fprintf(wr, "]")
	return wr.String()
}
927651
func (s StringObject) String() string {
	return fmt.Sprintf("StringObject{Key: %s, Value: '%s'}", DataToString(s.Key), DataToString(s.Value))
}
718592
func (c *ChoiceExpr) String() string {
	var buf bytes.Buffer

	buf.WriteString(fmt.Sprintf("%s: %T{Alternatives: [\n", c.p, c))
	for _, e := range c.Alternatives {
		buf.WriteString(fmt.Sprintf("%s,\n", e))
	}
	buf.WriteString("]}")
	return buf.String()
}
559355
func (g *Grammar) String() string {
	var buf bytes.Buffer

	buf.WriteString(fmt.Sprintf("%s: %T{Init: %v, Rules: [\n",
		g.p, g, g.Init))
	for _, r := range g.Rules {
		buf.WriteString(fmt.Sprintf("%s,\n", r))
	}
	buf.WriteString("]}")
	return buf.String()
}
1097676
func (sf *ScalarFunction) String() string {
	var buffer bytes.Buffer
	fmt.Fprintf(&buffer, "%s(", sf.FuncName.L)
	for i, arg := range sf.GetArgs() {
		buffer.WriteString(arg.String())
		if i+1 != len(sf.GetArgs()) {
			buffer.WriteString(", ")
		}
	}
	buffer.WriteString(")")
	return buffer.String()
}
845319
func (c *Command) String() string {
	if len(c.Params) > 0 {
		return fmt.Sprintf("%s %s", c.Name, string(bytes.Join(c.Params, byteSpace)))
	}
	return string(c.Name)
}
1256948
func (s Stack) String() string {
	var result string
	for _, value := range s {
		result += fmt.Sprintf("%s  |  ", value)
	}
	return result
}
469210
func (c *CodeBlock) String() string {
	return fmt.Sprintf("%s: %T{Val: %q}", c.p, c, c.Val)
}