| 264 | // ------------------------------------------------------------------------------ |
| 265 | |
| 266 | function parseErrorLine (result, inputLineNo, outputLineNo, input) { |
| 267 | var match = input.match(/^\s*\^\s*error: ([a-z-]+)\s*$/) |
| 268 | if (!match) { |
| 269 | return false |
| 270 | } |
| 271 | if (result.error) { |
| 272 | throw error(inputLineNo, 'only one error can be specified') |
| 273 | } |
| 274 | var x = input.indexOf('^') |
| 275 | if (result.cursorLine === outputLineNo && result.cursorX < x) { |
| 276 | x-- |
| 277 | } |
| 278 | result.error = { |
| 279 | name: match[1], |
| 280 | lineNo: outputLineNo, |
| 281 | x: x |
| 282 | } |
| 283 | return true |
| 284 | } |
| 285 | |
| 286 | function parseTabStopsLine (result, inputLineNo, outputLineNo, input) { |
| 287 | var match = input.match(/^([\^>\s]+)tabStops?\s*$/) |