textmate / c.tmbundle

TextMate support for C
42 stars 36 forks source link

struct member highlighted in red #72

Open mattgallivan opened 3 years ago

mattgallivan commented 3 years ago

See here.

The member significand is highlighted in red, while all other members are white. I have searched for matching keywords that might color it this way, but to no avail.

Alcaro commented 2 years ago

It's from this file, along with 3257 other deprecated names.

Most of the deprecations are properly namespaced and/or otherwise harmless (or even helpful) to warn about, but some of the 3258 are quite suspicious. In addition to significand, a quick glance reveals

{ // Some of them only turn red if inside a set of braces.
GetCurrentThread, GetCurrentProcess // Windows functions
daemon, syscall // glibc functions
compound, finite, gamma, pi, relation // Perfectly normal words
Button, Debugger, DebugAssert, Delay, Enqueue, Microseconds // Perfectly plausible class or function names
}

Full list, extracted from Platform.md

Warning about deprecated mac functions makes sense for a mac-only text editor like TextMate, but it makes significantly less sense for a syntax highlighter used across the entire GitHub.

And even for a mac-only text editor, some of the above are more likely to be project-local struct members or local variables than to be references to deprecated functionality.

My personal preference would be remove the deprecation list, turning those 3258 into unrecognized identifiers, and leave deprecation warnings to the compiler. But there are many possible answers, and I'm not a mac user, so I can't determine which would be the best for TextMate.