I'm running a somewhat old version of VAX - 1649, so forgive me if this has already been addressed (I didn't notice anything mentioned in the release notes).
If a section of code that's disabled due to an #if or #ifdef ends with what would be an unbalanced brace if the code were enabled, VAX's Context box gets confused and all the functions that follow get lumped in as members of the function that has the sorta unbalanced brace:
void foo()
{
#if 0
if (true) {
return;
}
else { // this dangling { in a disabled #if section
// confuses VAX's Context dropdown control
#endif
return;
}
void bar()
{
return;
}
int main()
{
foo();
bar();
return 0;
}
Only foo() shows up in the global scope, while bar() and main() show up only inside of foo()'s scope as foo.bar or foo.main. Also in the editor window, bar and main get colored as variables.
I know that one of VAX's features/behaviors is parsing disabled sections (partly becuase uncertainty of whether or not a section will be disabled at compile time), but I'd like to know if this is something that I can control at least to some extent (other than getting rid of the unbalanced brace). This behavior has been bugging me for the past couple of days on a particular file, and it took more troubleshooting than I would have liked to track down.
The IDE has information on whether or not #if sections will be compiled, as it displays disabled sections differently - can VAX somehow use that information? Or can we at least get it to ignore sections that are clearly disabled - like "#if 0" sections?