bug? in ast_matchers::dynamic::Parser::completeExpression

further hacking clang-query, not sure if it is a bug or lack of feature:
if I have a text like

varDecl(hasName(“aa”

the completion should propose or automatically complete the parentheses, as many as possible. For complex expressions that would be of a great help.
Not sure if this is a bug in LineEdit or the completeExpression or it is just a lack of feature.

Something else: wonder how much sense it makes for others, but in the code analysis I am doing it would be very useful to have strings (names) completed as appropriate. Having the correct strings completed would also give a hint if the expression written so far is what I want. Wold this be difficult to implement?

+peter and sam who have both worked on this

further hacking clang-query, not sure if it is a bug or lack of feature:
if I have a text like

varDecl(hasName("aa"

the completion should propose or automatically complete the parentheses,
as many as possible. For complex expressions that would be of a great help.
Not sure if this is a bug in LineEdit or the completeExpression or it is
just a lack of feature.

It is just lacking that feature.
The completion logic knows the arity of methods, so it could determine if
all the arguments have been passed and add closing parentheses.
In the example above, it should know that hasName() only takes one argument
and simply close it. It should not close varDecl() as it is variadic and
there could be more arguments coming.

Something else: wonder how much sense it makes for others, but in the code

analysis I am doing it would be very useful to have strings (names)
completed as appropriate. Having the correct strings completed would also
give a hint if the expression written so far is what I want. Wold this be
difficult to implement?

There are a some cases where autocomplete of literal strings make sense.
equalsBoundNode() is one of them. You might also want to repeat names
within subexpressions of anyOf()/eachOf().

Both these features would be in the dynamic::Parser class.

_Sam