Skip to content

Commit f8635f4

Browse files
author
Dave Bartolomeo
committed
Highlight unique as a keyword
`unique` is really a context-sensitive keyword, but that's even more of a hassle in a TextMate grammars than it is in the compiler itself. We'll just highlight it as a real keyword. The worst that will happen is that existing variables and predicates named "unique" will be highlighted like keywords, which will hopefully just encourage QL developers to rename those anyway.
1 parent e4df717 commit f8635f4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

extensions/ql-vscode/syntaxes/ql.tmLanguage.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,11 @@ repository:
422422
keyword: 'true'
423423
name: constant.language.boolean.true.ql
424424

425+
unique:
426+
match:
427+
keyword: 'unique'
428+
name: keyword.aggregate.unique.ql
429+
425430
where:
426431
match:
427432
keyword: 'where'
@@ -478,6 +483,8 @@ repository:
478483
- include: '#then'
479484
- include: '#this'
480485
- include: '#true'
486+
# `unique` is not really a keyword, but we'll highlight it as if it is.
487+
- include: '#unique'
481488
- include: '#where'
482489

483490
# A keyword that can be the first token of a predicate declaration.

0 commit comments

Comments
 (0)