]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add context-sensitive field name completion to Ada parser
authorTom Tromey <tromey@adacore.com>
Tue, 22 Feb 2022 20:12:02 +0000 (13:12 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 4 Apr 2022 18:46:09 +0000 (12:46 -0600)
commitd4da1b2c1b7b85968da608dde03e054cc0b1f7ca
tree96c22080bfa90440d2f3a26359c47c9328f54081
parent484e7c5ff5fd24cfb2946fadd76b6b67bbeb4169
Add context-sensitive field name completion to Ada parser

This updates the Ada expression parser to implement context-sensitive
field name completion.  This is PR ada/28727.

This is somewhat complicated due to some choices in the Ada lexer --
it chooses to represent a sequence of "."-separated identifiers as a
single token, so the parser must partially recreate the completer's
logic to find the completion word boundaries.

Despite the minor warts in this patch, though, it is a decent
improvement.  It's possible that the DWARF reader rewrite will help
fix the package completion problem pointed out in this patch as well.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28727
gdb/ada-exp.h
gdb/ada-exp.y
gdb/ada-lex.l
gdb/eval.c
gdb/expop.h
gdb/testsuite/gdb.ada/ptype_field.exp