Author |
Topic |
|
Darakim
Junior Member
14 Posts |
Posted - Apr 29 2005 : 2:57:31 PM
|
Is there anyway to have VisualAssist correctly parse functions defined like this example:
#ifdef ANSI PUBLIC int siActDat ( int cirId, /* circuit Id */ int *siCon, /* circuit connection */ int event /* event */ ) #else PUBLIC int siActDat(cirId, siCon, event) int cirId; /* circuit Id */ int *siCon; /* circuit connection */ int event; /* event */ #endif { ... }
Here is my version info: ------------------------------------------------- VA_X.dll file version 10.1.1298.0 Licensed to: VA X: [email protected] (2-user license) Support ends 2006.01.11 VAOpsWin.dll version 1.2.0.4 MSDev.exe version 6.0.9782.1 Devshl.dll version 6.0.9782.0 Devedit.pkg version 6.0.9782.0 Font: Lucida Console 13(Pixels) Comctl32.dll version 5.82.2800.1106 WindowsNT 5.1 Build 2600 Service Pack 1 2 processors -------------------------------------------------
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Apr 29 2005 : 11:35:43 PM
|
Dealing with #defines slows down the parser too much from what they have said in the past.
As for the K&R style, even without the #ifdef, it is not parsed corrrectly. I have asked WT about supporting this in the past, and they said that it is such an archaic style that they don't see ever getting around to supporting it. |
Joe Pizzi |
|
|
Stephen
Tomato Guru
United Kingdom
781 Posts |
Posted - May 03 2005 : 05:06:52 AM
|
Re the #ifdef's: It's not that it slows the parser down. It's that both are valid pieces of code which you want to edit. Moreover, VAX has no way of knowing which half of the #ifdef is on at any time. Do you really want it to reparse your whole project every time you change from Debug to Release build? |
Stephen Turner ClickTracks http://www.clicktracks.com/ Winner: ClickZ's Best Web Analytics Tool 2003 & 2004
|
|
|
Darakim
Junior Member
14 Posts |
Posted - May 03 2005 : 08:32:29 AM
|
Actually, I would love having VAX reparse my project when I change from debug to release. It would be so easier to have VAX jump to the right function (in case there are different definitions of function that depands on a #define). Doing this parsing would at the same time allow code that is not activated to be easily grey out by VAX.
I agree that this should not be done dynamically every time we write a new #define in a source file, but it could be done at project loading or when project settings are modified. |
|
|
|
Topic |
|