<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 13, 2014 at 8:26 PM, mobi phil <span dir="ltr"><<a href="mailto:mobi@mobiphil.com" target="_blank" class="cremed">mobi@mobiphil.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>further hacking clang-query, not sure if it is a bug or lack of feature:</div><div>if I have a text like <br></div><div><br>varDecl(hasName("aa"<br></div><div><br></div><div>the completion should propose or automatically complete the parentheses, as many as possible. For complex expressions that would be of a great help.<br>Not sure if this is a bug in LineEdit or the completeExpression or it is just a lack of feature.</div></div></blockquote><div><br></div><div>It is just lacking that feature.</div><div>The completion logic knows the arity of methods, so it could determine if all the arguments have been passed and add closing parentheses.</div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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?<br></div></div></blockquote><div><br></div><div>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().</div><div><br></div><div>Both these features would be in the dynamic::Parser class.</div><div><br></div><div>_Sam</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br clear="all"><div><br></div><br><div>rgrds,<br>mobi phil<br><br><br><br></div>
</div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" class="cremed">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank" class="cremed">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>