Add completion for operations
authorTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:27:57 +0000 (07:27 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:28:37 +0000 (07:28 -0700)
commit4933522da0d59823d2bfef3706e2252203365e9c
tree6d388690c17f9c42a69005c8a59d5dcb7bf23516
parent413403fc34156cf695b09553fca91e0990520787
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.
gdb/ChangeLog
gdb/parse.c
gdb/parser-defs.h
This page took 0.044216 seconds and 4 git commands to generate.