Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ async function validateAst(

const parserErrors = parsingResult.errors;

/**
* Some changes to the grammar deleted the literal names for some tokens.
* This is a workaround to restore the literals that were lost.
*
* See https://github.com/elastic/elasticsearch/pull/124177 for context.
*/
for (const error of parserErrors) {
error.message = error.message.replace(/\bLP\b/, "'('");
error.message = error.message.replace(/\bOPENING_BRACKET\b/, "'['");
Expand Down