diff options
author | Tom Tromey <tromey@adacore.com> | 2022-02-22 11:18:01 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-04-04 12:46:09 -0600 |
commit | c66ed94ae961c19b0d3028489d00a2df5a949aac (patch) | |
tree | 9a61add0242fd5914ed0ba3578bcbcb90fe76dcc /gdb/parser-defs.h | |
parent | 1e237aba2216f89b9a4b3235ad8d09d1b1b8f039 (diff) | |
download | fsf-binutils-gdb-c66ed94ae961c19b0d3028489d00a2df5a949aac.zip fsf-binutils-gdb-c66ed94ae961c19b0d3028489d00a2df5a949aac.tar.gz fsf-binutils-gdb-c66ed94ae961c19b0d3028489d00a2df5a949aac.tar.bz2 |
Implement completion for Ada attributes
This adds a completer for Ada attributes. Some work in the lexer is
required in order to match end-of-input correctly, as flex does not
have a general-purpose way of doing this. (The approach taken here is
recommended in the flex manual.)
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r-- | gdb/parser-defs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index 71381b1..3be7d6c 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h @@ -195,6 +195,14 @@ struct parser_state : public expr_builder void mark_completion_tag (enum type_code tag, const char *ptr, int length); + /* Mark for completion, using an arbitrary completer. */ + + void mark_completion (std::unique_ptr<expr_completion_base> completer) + { + gdb_assert (m_completion_state == nullptr); + m_completion_state = std::move (completer); + } + /* Push an operation on the stack. */ void push (expr::operation_up &&op) { |