* Update lineno and column based on `str`.
(str)
| 17 | */ |
| 18 | |
| 19 | function updatePosition(str) { |
| 20 | var lines = str.match(/\n/g); |
| 21 | if (lines) lineno += lines.length; |
| 22 | var i = str.lastIndexOf('\n'); |
| 23 | column = ~i ? str.length - i : column + str.length; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Mark position and patch `node.position`. |
no test coverage detected