* Create an error * @param {Object} state * @param {string} message * @return {Error} instantiated error * @private
(state, message)
| 1843 | * @private |
| 1844 | */ |
| 1845 | function createError (state, message) { |
| 1846 | const c = col(state) |
| 1847 | const error = new SyntaxError(message + ' (char ' + c + ')') |
| 1848 | error.char = c |
| 1849 | |
| 1850 | return error |
| 1851 | } |
| 1852 | |
| 1853 | // Now that we can parse, automatically convert strings to Nodes by parsing |
| 1854 | typed.addConversion({ from: 'string', to: 'Node', convert: parse }) |
no test coverage detected
searching dependent graphs…