fixed #12715 - made Visual Studio conditions work again
This still needs Visual Studio import tests but I might not get to those. And as this is a high severity regression I want to get in a fix ASAP (as well as a backport and a 2.14.x patch release).
Is the test snippet from a project file? Why do we need to create an AST from that?
Is the test snippet from a project file?
Yes. That is a bog standard condition used in every Visual Studio project file.
Why do we need to create an AST from that?
I need to create the AST so Token::astOperandX() is set.
But a .vcxproj is XML, do we treat that as code somehow? Seems sketchy...
But a .vcxproj is XML, do we treat that as code somehow?
This is a string extracted from it (macros obviously being replaced):
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"/>
I think this is actually C# code.
Seems sketchy...
Hence the TODOs to improve the testing and maybe handling it differently.
:+1:
This needs to be cleaned up but it is all I can do right now and this needs to be fixed ASAP since it breaks scanning Visual Studio projects.
There is a WIP selftest/dogfooding job which would have caught this with #5477.