I think you're crediting ST with too much intelligence
, or is part of. That is, whether it is a constant, operator, parameter or it is within a comment or function definition. This information is then used by your current theme to decide what colour and format it should use.
I can see that 'x' is considered to be 'source.js support.constant.js', whereas 'z' is considered just part of 'source.js'. This accounts for the different colours, although it's difficult to say whether this is intentional (by the author of the tmLanguage file).
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.