Make parsing more flexible and avoid breaking API change build error.

This commit is contained in:
Arjen Duursma 2024-07-25 22:27:50 +02:00
parent f6ad0d4b9b
commit aea5db9b50

View File

@ -2721,12 +2721,22 @@ ASTMergeStatement MergeStatement() :
| [ LOOKAHEAD(2) SchemaName() "." ] TableName() [ TableAlias() ]
)
<ON> "(" Condition() ")"
( <WHEN> ( ( KEYWORD("MATCHED") MergeUpdateClause() ) | ( <NOT> KEYWORD("MATCHED") MergeInsertClause() ) ) ) +
( <WHEN> ( ( KEYWORD("MATCHED") MergeUpdateClause() ) | ( <NOT> KEYWORD("MATCHED") MergeInsertClause() ) ) ) *
[ ErrorLoggingClause() ]
[ ReturningClause() ]
{ return jjtThis; }
}
/*
* Beware: MergeUpdateClausePrefixfunction is no longer used as MergeStatement is simplified,
* but kept for tooling requirement not breaking interface
*/
void MergeUpdateClausePrefix() #void:
{}
{
<WHEN> KEYWORD("MATCHED")
}
ASTMergeUpdateClause MergeUpdateClause() :
{}
{