Remove jsonapi.c's lex_accept().
authorRobert Haas <rhaas@postgresql.org>
Fri, 17 Jan 2020 19:06:41 +0000 (14:06 -0500)
committerRobert Haas <rhaas@postgresql.org>
Fri, 24 Jan 2020 18:29:52 +0000 (10:29 -0800)
commit530609aa4263bee5b5ca205d83f0dbad098d0465
tree8450057f60d7311973fc422d19b643fbd4d78fd1
parent11b5e3e35d3900164cb36754ee4e4dcab0bd02f0
Remove jsonapi.c's lex_accept().

At first glance, this function seems useful, but it actually increases
the amount of code required rather than decreasing it. Inline the
logic into the callers instead; most callers don't use the 'lexeme'
argument for anything and as a result considerable simplification is
possible.

Along the way, fix the header comment for the nearby function
lex_expect(), which mislabeled it as lex_accept().

Patch by me, reviewed by David Steele, Mark Dilger, and Andrew
Dunstan.

Discussion: http://postgr.es/m/CA+TgmoYfOXhd27MUDGioVh6QtpD0C1K-f6ObSA10AWiHBAL5bA@mail.gmail.com
src/backend/utils/adt/jsonapi.c