printer-notifications/node_modules/css-tree/lib/definition-syntax/SyntaxError.js

13 lines
408 B
JavaScript
Raw Permalink Normal View History

2023-11-13 21:10:04 +00:00
import { createCustomError } from '../utils/create-custom-error.js';
export function SyntaxError(message, input, offset) {
return Object.assign(createCustomError('SyntaxError', message), {
input,
offset,
rawMessage: message,
message: message + '\n' +
' ' + input + '\n' +
'--' + new Array((offset || input.length) + 1).join('-') + '^'
});
};