(commands = [])
| 41 | } |
| 42 | |
| 43 | reset(commands = []) { |
| 44 | const chunks = [{ |
| 45 | commands: [], |
| 46 | lineNumber: undefined, |
| 47 | }]; |
| 48 | while (commands.length) { |
| 49 | const command = commands.shift(); |
| 50 | const { key, method, args } = command; |
| 51 | if (key === null && method === 'delay') { |
| 52 | const [lineNumber] = args; |
| 53 | chunks[chunks.length - 1].lineNumber = lineNumber; |
| 54 | chunks.push({ |
| 55 | commands: [], |
| 56 | lineNumber: undefined, |
| 57 | }); |
| 58 | } else { |
| 59 | chunks[chunks.length - 1].commands.push(command); |
| 60 | } |
| 61 | } |
| 62 | this.props.setChunks(chunks); |
| 63 | this.props.setCursor(0); |
| 64 | this.pause(); |
| 65 | this.props.setLineIndicator(undefined); |
| 66 | } |
| 67 | |
| 68 | build(file) { |
| 69 | this.reset(); |
nothing calls this directly
no outgoing calls
no test coverage detected