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.)
This commit is contained in:
parent
1e237aba22
commit
c66ed94ae9
4 changed files with 103 additions and 12 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue