MCPcopy Create free account
hub / github.com/prettier/prettier / createParseError

Function createParseError

src/language-graphql/parser-graphql.js:27–38  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

25};
26
27function createParseError(error) {
28 /* c8 ignore next 3 */
29 if (!(error instanceof GraphQLError)) {
30 return error;
31 }
32
33 const {
34 message,
35 locations: [start],
36 } = error;
37 return createError(message, { loc: { start }, cause: error });
38}
39
40function parse(text /* , options */) {
41 let ast;

Callers 1

parseFunction · 0.70

Calls 1

createErrorFunction · 0.85

Tested by

no test coverage detected