Urara-Blog/node_modules/.pnpm-store/v3/files/2a/4e30ca3039aa4668eb6d8e6eb43182418e91335708b44f7de255d19ef3ceb85edbd0f210b49b410dc1ed0783921338250216e373650793eae8520c2fc0861c
2022-08-14 01:14:53 +08:00

16 lines
471 B
Text

'use strict';
const createCustomError = require('../utils/create-custom-error.cjs');
function SyntaxError(message, input, offset) {
return Object.assign(createCustomError.createCustomError('SyntaxError', message), {
input,
offset,
rawMessage: message,
message: message + '\n' +
' ' + input + '\n' +
'--' + new Array((offset || input.length) + 1).join('-') + '^'
});
}
exports.SyntaxError = SyntaxError;