From 8b4b07c55b8b9d28dca60fa02c06056aa2454ebe Mon Sep 17 00:00:00 2001 From: Tormod Alf Try Tufteland Date: Sat, 20 Mar 2021 17:16:40 +0100 Subject: kotlin: updated parser, and added annotation highlight again --- lockfile.json | 2 +- queries/kotlin/highlights.scm | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lockfile.json b/lockfile.json index c230902b9..2f7b78325 100644 --- a/lockfile.json +++ b/lockfile.json @@ -72,7 +72,7 @@ "revision": "0ba7a24b062b671263ae08e707e9e94383b25bb7" }, "kotlin": { - "revision": "4f404a3355ee2447d3a52cb4bd72a6ae1fb32175" + "revision": "48bfb38abd93f8d617877d7bb7f92a6bb1166285" }, "ledger": { "revision": "609d5e5ab5955823b3faeaec8d2afc91860c639a" diff --git a/queries/kotlin/highlights.scm b/queries/kotlin/highlights.scm index 5ac5a7e59..7c59815b8 100644 --- a/queries/kotlin/highlights.scm +++ b/queries/kotlin/highlights.scm @@ -70,10 +70,9 @@ (type_identifier) @type ;; Annotations -;; TODO: -;(annotation (single_annotation) @attribute) -;(single_annotation (user_type (type_identifier) @attribute)) -;(single_annotation (constructor_invocation (user_type (type_identifier) @attribute))) +(annotation (single_annotation) @annotation) +(single_annotation (user_type (type_identifier) @annotation)) +(single_annotation (constructor_invocation (user_type (type_identifier) @annotation))) ;; it @@ -103,6 +102,8 @@ ;; Keywords [ + "this" + "override" "enum" "as" "class" @@ -121,6 +122,8 @@ "throw" ] @keyword +(null_literal) @keyword + ; const etc. (property_modifier) @keyword -- cgit v1.2.3-70-g09d2