Closed vsajip closed 3 months ago
Well, currently, as regards preprocessing, it just ignores everything that is not #if-#elif-#endif.
I guess, in principle, we shouldn't be throwing away any info that occurs in the source file, so it probably makes sense for the #pragma to be available in the AST as a comment, i.e. an UNPARSED
token.
So, naturally, if you want to do something about this, by all means. It's not something I would classify as very urgent.
not something I would classify as very urgent
Agreed. I was trying to turn off the many "unreachable code" warnings that you get as an inevitable result of how the code generation works.
Confirmed fixed in #190.
While not part of the C# language itself, it might be expected that a parser for C# would support handling compiler pragmas. This source:
results in the following AST, which is missing the pragma:
I'm not sure whether this due to something in the preprocessor (since pragmas have the same form as preprocessor directives).