Add completion for operations
This patch adds the necessary support for field name completion for
expressions using class operation.
This patch takes an approach similar to what is done today. It might
be good, in the future, to change completion to be a method on the
base class, to enable context-sensitive completion in more areas.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* parser-defs.h (struct expr_completion_state) <expout_last_op>:
New member.
(struct parser_state) <mark_struct_expression>: New method.
* parse.c (parser_state::mark_struct_expression): Update assert.
(parser_state::mark_struct_expression): New method.
(parser_state::mark_completion_tag): Update assert.
(parse_expression_for_completion): Handle expout_last_op.