AddChunk adds current lines into a chunk of code that should be compiled separately.
()
| 274 | // AddChunk adds current lines into a chunk of code |
| 275 | // that should be compiled separately. |
| 276 | func (sh *Shell) AddChunk() { |
| 277 | if len(sh.Lines) == 0 { |
| 278 | return |
| 279 | } |
| 280 | sh.Chunks = append(sh.Chunks, strings.Join(sh.Lines, "\n")) |
| 281 | sh.Lines = nil |
| 282 | } |
| 283 | |
| 284 | // TranspileCode processes each line of given code, |
| 285 | // adding the results to the LineStack |
no outgoing calls
no test coverage detected