Inconsistent syntax highlighting
Describe the bug Syntax highlighting is not consistent among type names.
To Reproduce Steps to reproduce the behavior:
- Go to any .cto model, with the VSCode extension enabled.
Expected behavior All type names should have consistent highlighting.
Screenshots
PaymentRequest is highlighted, but PayOut isn't.
Desktop (please complete the following information):
- OS: Windows 10
- Browser N/A
- Version N/A
This looks like a bug to me. My general intuition is that the syntax highlighting should use colors based on the category of tokens in the grammar: one color for all keywords, one color for all type names, etc.
That sounds right, I will try to see if I can fix it.
I am unable to understand the exact solution approach after exploring a bit. What i found was that PaymentRequest is getting captured as a support object either as "support.variable.dom.js" or as "support.class.dom.js" , in the concerto.tmLanguage.json file. (Image - https://imgur.com/a/MWIuYEp). So, should PaymentRequest -
- have the same color highlighting as PayOut and its other capturing group is overriden when used with a class definition before its declaration
- remain as it is (not have the same color), but should throw error because it has already been captured and been declared as another type.