/
githubmirror
/
babel
Обзор
Документация
Войти
/
githubmirror
/
babel
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/babel-parser/src/parse-error/parse-expression-errors.ts
8 строк
502 B
Huáng Jùnliàng
Improve parseExpression error messages (#17311)
29 май 2025, 19:51
Не верифицирован
29 май 2025, 19:51
0d41813
Код
Авторство
О чём код?
import type { ParseErrorTemplates } from "../parse-error.ts"; export default { ParseExpressionEmptyInput: "Unexpected parseExpression() input: The input is empty or contains only comments.", ParseExpressionExpectsEOF: ({ unexpected }: { unexpected: number }) => `Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(unexpected)}\`.`, } satisfies ParseErrorTemplates;