Closed devoncarew closed 1 year ago
Looks like I added this in #38, as it's used in guarded patterns:
I think we'd expect it to be coloured in this way here? This grammar here is quite loose so it may be highlighted in more places than just here, although I'd expect semantic tokens to fix those (if they don't, and we see an incorrect highlight once semantic tokens are applied, I'd consider that a semantic tokens bug).
WDYT?
Ah, thanks for the correction :)
...return|switch|while|when)...
It looks like I reviewed that PR as well. I'd thought perhaps that was older artifacts in the file, but it looks like it's new highlighting to support upcoming features.
I see 'when' in the list of keywords in the grammar in this repo, but I don't believe it's an actual built-in identifier or a reserved word?
https://github.com/dart-lang/dart-syntax-highlight/blob/master/grammars/dart.json#L320
Am I missing something in the spec, or is this a historical artifact of this grammar file?
cc @DanTup