You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently preprocessor conditionals are just ignored - everything in them is parsed as usual regardless of whether the condition is true. This would lead to parser errors in a bunch of different ways.
The text was updated successfully, but these errors were encountered:
This is only really feasible once constant expression analysis is implemented - I think it should work out okay to use the same analysis for other expressions as with preprocessor conditions. Even if we can't get the conditions right, it's still better to parse it either one way or the other than it is to assume both an #if and #else block are true.
CLion's approach to this is to generate OCDirective elements for the #ifdef/#else/#endif as usual, but to replace the element types of whichever branch is inactive with a special comment token type, so all the non-compiled PsiElements end up as PsiComment(CONDITIONALLY_NON_COMPILED_COMMENT).
Currently preprocessor conditionals are just ignored - everything in them is parsed as usual regardless of whether the condition is true. This would lead to parser errors in a bunch of different ways.
The text was updated successfully, but these errors were encountered: