Skip to content

Commit 01fac31

Browse files
committed
Vim syntax: highlight numbers and new keywords
1 parent fa07364 commit 01fac31

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

misc/vim/syntax/ql.vim

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
syn keyword qlKeyword from where select predicate in as order by asc desc module
1+
syn keyword qlKeyword from where select predicate in as order by asc desc module result this super
22
syn keyword qlAnnotation abstract cached external final library noopt private
33
syn keyword qlLogic not and or implies exists forall forex any none
44
syn keyword qlConditional if then else
55
syn keyword qlType int float string boolean date
66
syn keyword qlImport import nextgroup=qlQualified skipwhite
77
syn keyword qlTypeMod class extends instanceof nextgroup=qlType skipwhite
8-
syn keyword qlPredicate rank
8+
syn keyword qlAggregate avg concat count max min rank strictconcat strictcount strictsum sum
9+
syn keyword qlConstant false true
910

1011
syn match qlQualified "\v([a-zA-Z_]+\.)*[a-zA-Z_]+"
1112
syn match qlComment "//.*$" contains=@Spell
1213
syn match qlComparison "[!=<>]"
1314
syn match qlVar "\v[a-zA-Z0-9_#]+"
1415
syn match qlType "\v[@A-Z][a-zA-Z0-9_]+"
1516
syn match qlPredicate "\v[a-zA-Z0-9_#@]+\ze\("
17+
syn match qlInt "\d\+"
18+
syn match qlFloat "\d\+\.\d\+"
1619

1720
syn region qlComment start="/\*" end="\*/" contains=@Spell
1821
syn region qlString start=/\v"/ skip=/\v\\./ end=/\v"/
@@ -24,9 +27,13 @@ hi def link qlComparison Operator
2427
hi def link qlAnnotation PreProc
2528
hi def link qlTypeMod Keyword
2629
hi def link qlLogic Keyword
30+
hi def link qlAggregate Keyword
2731
hi def link qlPredicate Function
2832
hi def link qlConditional Conditional
2933
hi def link qlType Type
34+
hi def link qlConstant Constant
35+
hi def link qlInt Number
36+
hi def link qlFloat Float
3037
if !exists("g:qlVarNoHighlight")
3138
hi def link qlVar Identifier
3239
endif

0 commit comments

Comments
 (0)