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
565 stars 97 forks source link

Fields on a struct declared after method not recognized #226

Open JoaoBaptMG opened 2 years ago

JoaoBaptMG commented 2 years ago

When a method defined in a struct uses fields that are defined after that method, HLSL Tools does not recognize and highlight them. For example: image

Example code:

struct ExampleStruct
{
    void exampleMethod(float x, float y)
    {
        field1 = x;
        field2 = y;
    }

    float field1;
    float field2;
};

The fields declared before a method are properly recognized, though: image