()
| 12 | } |
| 13 | |
| 14 | func (self *Command) String() string { |
| 15 | |
| 16 | var sb strings.Builder |
| 17 | |
| 18 | sb.WriteString(self.Type.String()) |
| 19 | |
| 20 | if len(self.Operand) > 0 { |
| 21 | sb.WriteString(" ") |
| 22 | for index, operand := range self.Operand { |
| 23 | if index > 0 { |
| 24 | sb.WriteString(", ") |
| 25 | } |
| 26 | sb.WriteString(fmt.Sprintf("%v", operand)) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | return sb.String() |
| 31 | } |
| 32 | |
| 33 | type Chunk struct { |
| 34 | Commands []Command |
nothing calls this directly
no test coverage detected