The patch extends an earlier hack for handling defined in a direction that appears too complex and difficult to maintain. It would be better to move symbol look-up out of the initial lexing and into EvaluateTokens after the initial loop for checking "defined" clauses. Then augmenting the "defined" loop to handle "defined TOKEN".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The patch extends an earlier hack for handling defined in a direction that appears too complex and difficult to maintain. It would be better to move symbol look-up out of the initial lexing and into EvaluateTokens after the initial loop for checking "defined" clauses. Then augmenting the "defined" loop to handle "defined TOKEN".
Change set [efde54] implements #if defined TOKEN.
It also implements handling of some macros with arguments. This is a large change so may contain bugs.
Related
Commit: [efde54]
Thanks for working on this. (I had started trying to refactor, but ran out of free time.)
I will test and let you know if any problems arise for me.
Possibly a minor copy-paste error (
-Wshadow
)?Fixed the other way round with [ffc1bc], by relying on the initial declaration in all branches.
-Wshadow and some other warnings are not turned on because other externally maintained lexers have shadowed variables and other issues.
Related
Commit: [ffc1bc]