katoikia-app/web-ui/web-react/node_modules/css-tree/lib/definition-syntax/SyntaxError.js

15 lines
460 B
JavaScript
Raw Normal View History

2022-07-06 04:15:11 +00:00
var createCustomError = require('../utils/createCustomError');
module.exports = function SyntaxError(message, input, offset) {
var error = createCustomError('SyntaxError', message);
error.input = input;
error.offset = offset;
error.rawMessage = message;
error.message = error.rawMessage + '\n' +
' ' + error.input + '\n' +
'--' + new Array((error.offset || error.input.length) + 1).join('-') + '^';
return error;
};