emacs: restrict parameterized annotation highlightning

This commit is contained in:
Esben Sparre Andreasen 2019-02-15 12:45:36 +01:00
Родитель 046c8c963f
Коммит b6f2e60ece
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -13,8 +13,8 @@
(defconst ql--at-type-regex "\\_<@\\w+\\>")
(defconst ql--predicate-regex "\\(\\_<\\w+\\(\\+\\|\\*\\)?\\_>\\)\\s-*(")
(defconst ql--primitive-type-regex (regexp-opt '("int" "string" "float" "boolean" "date") 'symbols))
(defconst ql--annotation-regex (regexp-opt '("abstract" "cached" "external" "final" "transient" "library" "private" "deprecated" "override" "query") 'words))
(defconst ql--parameterized-annotation-regex "\\<\\(pragma\\|language\\|bindingset\\) *\\[ *[a-z, ]*\\]")
(defconst ql--annotation-regex (regexp-opt '("abstract" "cached" "external" "final" "transient" "library" "private" "deprecated" "override" "query" "pragma" "language" "bindingset") 'words))
(defconst ql--annotation-arg-regex (regexp-opt '("inline" "noinline" "nomagic" "noopt" "monotonicAggregates") 'words))
(defconst ql--keywords
'("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"
)
@ -25,7 +25,7 @@
(,ql--primitive-type-regex . 'font-lock-type-face)
(,ql--at-type-regex 0 'font-lock-type-face)
(,ql--annotation-regex . 'font-lock-preprocessor-face)
(,ql--parameterized-annotation-regex . 'font-lock-preprocessor-face))
(,ql--annotation-arg-regex . 'font-lock-keyword-face))
)
(defvar ql-mode-base-map