Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b6f2e60

Browse files
author
Esben Sparre Andreasen
committed
emacs: restrict parameterized annotation highlightning
1 parent 046c8c9 commit b6f2e60

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

misc/emacs/ql-mode-base.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
(defconst ql--at-type-regex "\\_<@\\w+\\>")
1414
(defconst ql--predicate-regex "\\(\\_<\\w+\\(\\+\\|\\*\\)?\\_>\\)\\s-*(")
1515
(defconst ql--primitive-type-regex (regexp-opt '("int" "string" "float" "boolean" "date") 'symbols))
16-
(defconst ql--annotation-regex (regexp-opt '("abstract" "cached" "external" "final" "transient" "library" "private" "deprecated" "override" "query") 'words))
17-
(defconst ql--parameterized-annotation-regex "\\<\\(pragma\\|language\\|bindingset\\) *\\[ *[a-z, ]*\\]")
16+
(defconst ql--annotation-regex (regexp-opt '("abstract" "cached" "external" "final" "transient" "library" "private" "deprecated" "override" "query" "pragma" "language" "bindingset") 'words))
17+
(defconst ql--annotation-arg-regex (regexp-opt '("inline" "noinline" "nomagic" "noopt" "monotonicAggregates") 'words))
1818
(defconst ql--keywords
1919
'("and" "any" "as" "asc" "avg" "boolean" "by" "class" "concat" "count" "date" "desc" "else" "exists" "extends" "false" "float" "forall" "forex" "from" "if" "implies" "import" "in" "instanceof" "int" "max" "min" "module" "not" "none" "or" "order" "predicate" "rank" "result" "select" "strictconcat" "strictcount" "strictsum" "string" "sum" "super" "then" "this" "true" "where"
2020
)
@@ -25,7 +25,7 @@
2525
(,ql--primitive-type-regex . 'font-lock-type-face)
2626
(,ql--at-type-regex 0 'font-lock-type-face)
2727
(,ql--annotation-regex . 'font-lock-preprocessor-face)
28-
(,ql--parameterized-annotation-regex . 'font-lock-preprocessor-face))
28+
(,ql--annotation-arg-regex . 'font-lock-keyword-face))
2929
)
3030

3131
(defvar ql-mode-base-map

0 commit comments

Comments
 (0)