tgjones / HlslTools

A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
http://timjones.io/blog/archive/2016/04/25/hlsl-tools-for-visual-studio-v1.0-released
Other
568 stars 98 forks source link

Support typedef semantics #81

Closed dustin-biser closed 7 years ago

dustin-biser commented 7 years ago

Currently the following valid hlsl typedef is not recognized by this extension

struct VS_Output
{
    float4 position : SV_POSITION;
    float2 texCoord : TEXCOORD;
};
typedef VS_Output PS_Input;

Currenlty typedef is not recognized as a keyword and PS_Input is not recognized as a type.

tgjones commented 7 years ago

Which version are you using? I added typedef support quite recently, but the latest version on the Marketplace (at the time of writing, v1.1.197) should work correctly with your example. Please re-open if that's not the case.

Although it should be parsed correctly, I have just noticed though that typedef wasn't being highlighted correctly, and neither were the aliased types, so I've just fixed that.