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-f6obsa10awihbal...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/530609aa4263bee5b5ca205d83f0dbad098d0465 Modified Files -------------- src/backend/utils/adt/jsonapi.c | 124 +++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 73 deletions(-)
