Files
test-repo/src/parser-create-error.js
T
Simen Bekkhus 584bf4ecbf Upgrade babel code frame (#1902)
* Upgrade babel code frame

* Get better marker for parsing errors in postcss-values-parser
2017-06-02 14:11:05 -07:00

13 lines
288 B
JavaScript

"use strict";
function createError(message, loc) {
// Construct an error similar to the ones thrown by Babylon.
const error = new SyntaxError(
message + " (" + loc.start.line + ":" + loc.start.column + ")"
);
error.loc = loc;
return error;
}
module.exports = createError;