Subject: bug#75406: 31.0.50; [PATCH] csharp-ts-mode does not highlight type in typeof() expressions

From: Jostein Kjønigsen <[email-masked]>
Date: Wed, 8 Jan 2025 08:23:16 +0100

On 8 Jan 2025, at 07:14, Yuan Fu <[email-masked]> wrote:
Thanks! I suspect that an earlier grammar version used type_of_expression. Can you see if it’s true?

This seems to be true. This was changed in a commit in May 2024.

test: update tests · tree-sitter/tree-sitter-c-sharp@cd38110

github.com

If it is, we should keep the rules for both type_of_expression and typeof_expression, WDYT?

Compatibility is a good thing, unless it comes at a too big cost. ;)

On the same note, we could use some utility function that makes it less verbose to test queries and use different query based on the test result.

I agree about that. That makes sense.

Is there any precedent for how that is done in other major-modes?

—

Jostein