Bug 88036

Summary: [WebKit2] parser.py cannot handle nested #if conditions
Product: WebKit Reporter: Andy Estes <aestes>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Andy Estes
Reported 2012-05-31 19:16:46 PDT
parser.py, which parses messages.in files and generates message receiver .cpp files, cannot handle nested #if conditions. Whenever '#if' is encountered the variable that stores the current condition is set unconditionally, and whenever '#endif' is encountered that variable is cleared unconditionally. This limitation makes conditions more verbose in the .messages.in files.
Attachments
Andy Estes
Comment 1 2012-05-31 19:20:46 PDT
There does appear to be one exception to this limitation, which is that a master condition can be specified at the top of the file with additional conditions nested inside it.
Andy Estes
Comment 2 2012-05-31 19:28:24 PDT
The right fix here would presumably be to run .messages.in files through the preprocessor like we do for sandbox profiles rather than trying to make parser.py better emulate the preprocessor.
Note You need to log in before you can comment on or make changes to this bug.