Closed qingpeng9802 closed 1 year ago
Code
children0 instanceof Child === true; children0 instanceof Child.prototype.constructor === true; children0 instanceof(Child.prototype.constructor) === true; children0 instanceof dict.CONST.ctor === true;
Current highlighting:
Expected highlighting:
Reason: The set of termination characters is incomplete so '#type' will leaks to the end of line in some cases. https://github.com/microsoft/TypeScript-TmLanguage/blob/0dfae8cc4807fecfbf8f1add095d9817df824c95/TypeScript.YAML-tmLanguage#L57
Also, '#type' is kind of aggressive for instanceof, we should probably use a behavior similar to extends to get more accurate highlighting on properties, https://github.com/microsoft/TypeScript-TmLanguage/blob/0dfae8cc4807fecfbf8f1add095d9817df824c95/TypeScript.YAML-tmLanguage#L1563-L1569 https://github.com/microsoft/TypeScript-TmLanguage/blob/0dfae8cc4807fecfbf8f1add095d9817df824c95/TypeScript.YAML-tmLanguage#L948-L969
instanceof
extends
A PR will be linked.
Code
Current highlighting:![image](https://user-images.githubusercontent.com/43924785/178147354-c10c073f-79d7-4122-a8c1-79cc9f6dcf1b.png)
Expected highlighting:![image](https://user-images.githubusercontent.com/43924785/178147381-efbf8db9-e972-474f-8649-98191832ba2b.png)
Reason: The set of termination characters is incomplete so '#type' will leaks to the end of line in some cases. https://github.com/microsoft/TypeScript-TmLanguage/blob/0dfae8cc4807fecfbf8f1add095d9817df824c95/TypeScript.YAML-tmLanguage#L57
Also, '#type' is kind of aggressive for
instanceof
, we should probably use a behavior similar toextends
to get more accurate highlighting on properties, https://github.com/microsoft/TypeScript-TmLanguage/blob/0dfae8cc4807fecfbf8f1add095d9817df824c95/TypeScript.YAML-tmLanguage#L1563-L1569 https://github.com/microsoft/TypeScript-TmLanguage/blob/0dfae8cc4807fecfbf8f1add095d9817df824c95/TypeScript.YAML-tmLanguage#L948-L969A PR will be linked.