<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">[...]</div></div></blockquote><div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nice! Could scope detection potentially also be used to add local variables to autocompletion?<br></blockquote><div><br></div><div>Thomas,</div><div><br></div><div>I looked fairly closely at the possibility of adding local variables a while ago.  There are several things missing to get local variables and local scope completion (talking about c.c languages only, other languages mileage may vary :-)</div>
<div><br></div><div>1. our parsers don't parse anything other than global scope, which is only declarations, so they only parse declarations, not statements, and they may be complicated significantly by the addition of the ability to discriminate between declarations and statements that are mixed inside local scopes.</div>
<div><br></div><div>2. tagmanager itself only understands named scopes, not lexical scopes, so whilst the fold info can detect a lexical scope, tagmanager has no way of storing such information.  If tagmanager could store it, it would probably fall out of the parser anyway, once the local scopes are parsed, so fold info isn't much benefit.</div>
<div><br></div><div>3. for C, autocomplete would need to understand how to look up local variables, through the nested scopes, also the rules for hiding outer scopes, and for C++, also rules for member lookup in member functions.  For other languages whatever rules they may add.  And it has to apply these rules to partially complete symbol names, and fast.</div>
<div><br></div><div>All of which is a way of saying: 1. its possible 2. its a lot of work, 3. fold info won't help much if at all.</div><div><br></div><div>Cheers</div><div>Lex</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
PS: The video didn't play in VLC (stuck on first frame) but did with ffplay.<br></blockquote><div><br></div><div>Sadly can't play it at all, I'm on holidays with very slow internet, effectively email and some browsing only, no IRC and no videos :(</div>
<div><br></div></div></div></div>