Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] addMacro seems to have no effect

The definition of 'ScannerConfig' looks correct. Although you claim that 'it' is being called I would think that the parser does not use your scanner config. Please elaborate on what is being called and on how you provide the 'ScannerConfig' to the parser.
Markus.

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Maximilian Odendahl
Sent: Mittwoch, 16. März 2011 10:54
To: cdt-dev
Subject: [cdt-dev] addMacro seems to have no effect
Importance: Low

Hi,

while I can successfully syntax highlight additional keywords now, I would also like to get rid of "syntax errors" markers.


I basically just want my additional stuff to be ignored by the parser, 
therefore I'm providing my own ScannerConfig and using addMacro, but 
both variants below do not seem to work and have no effect. I made sure 
they are actually called, though.


public class ScannerConfig extends
         GNUScannerExtensionConfiguration {
     public ScannerConfig() {
         super();

         addMacro("__PNin", "");
         addMacro("__PNout", "/**/");
     }
}


If I edit the source code directly like

#define __PNin
#define __PNout /**/

I get exactly the desired behaviour. Do I have wrong expectations into 
addMacro?

Thanks for any help.

Best,
Max



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top