Open PIG208 opened 3 weeks ago
Yeah, if it's some form of quoting a name it should be Name.something
not String.something
.
MySQL has Name.Quoted
(which also appears only there)...
Looks like a motivation for adding these non-standard token types are for user customization (#1555). They typically use the fallback of the parent token type for most styles. However, perhaps it will be better to use a fitting standard token type (or add a new one) for better discoverability.
In the case of String.Name
, maybe it can be refactored to use Name.Quoted
as well, making the latter a standard token type too.
PostgresLexer (added in https://github.com/pygments/pygments/commit/4e878a0d8bd39450028938295d52436c630fef4d) can generate
String.Name
, which is not included inpygments.token.STANDARD_TYPES
.Not sure if this is intended, but for this input
it produces something like this:
This token is only used in
PostgresLexer
and nowhere else:It appears to me that it is pretty uncommon for any style to use tokens that are not yet a part of the
STANDARD_TYPES
.We could either use
sn
as the shortened value, or just switch to an existing standard token likeString
(which is howString.Name
is effectively styled now).