Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Matching braces confused by #ifdef
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

PatLuja
Tomato Guru

Belgium
416 Posts

Posted - Feb 20 2004 :  02:47:34 AM  Show Profile
Hello all,

I've noticed that the matching braces will be confused by #ifdef's. See the following example:
void Function(const bool condition, const bool special_condition)
{
#ifdef SPECIALCONDITION
  if (condition || special_condition) {
#else
  if (condition) {
#endif
    // Do something
  }
}
The last brace isn't matched with the first brace (of Function), but with the first if-statement. I can imagine this is a tough one for Visual Assist. And I must admit that this (luckily) isn't something that I encounter frequently in the code of my company, but in some special cases it does.

It not something that is critical, so I want to ask the team of WholeTomato nicely if they can look into it sometime...
Thank you in advance.

With kind reagards,
Patrick Luja

support
Whole Tomato Software

5566 Posts

Posted - Feb 20 2004 :  03:23:46 AM  Show Profile
There is a slim chance we will ever fix this one. VA X parses all code inside #ifdef and #else clauses since you want Intellisense as you write each of the clauses. VA X doesn't toss out clauses like the code compiler does. Heck, VA X does not even know what is #defined.

We have looked at special cases, eg nearby and/or related #ifdef clauses that end with { itself. The matter gets ugly fast.

FWIW, VA X recovers from too many }'s. They just close all open scopes.

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000