From c610c78576f372684f42eeaec56d13be2cf304d2 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Sat, 28 Jan 2023 15:47:47 -0500 Subject: chore: update thrift queries --- lockfile.json | 2 +- queries/thrift/highlights.scm | 42 ++++++++++++++++++++++++++++++++++-------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/lockfile.json b/lockfile.json index 1eebbbd5d..dd57258c5 100644 --- a/lockfile.json +++ b/lockfile.json @@ -399,7 +399,7 @@ "revision": "0ff887f2a60a147452d52db060de6b42f42f1441" }, "thrift": { - "revision": "967048ad0c4fbf93c25f5a0c848ad30b0932c9c4" + "revision": "a4e433e7198c811d44164d50c491c82ec533dfdc" }, "tiger": { "revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42" diff --git a/queries/thrift/highlights.scm b/queries/thrift/highlights.scm index f5d8a7ef3..9d25b8357 100644 --- a/queries/thrift/highlights.scm +++ b/queries/thrift/highlights.scm @@ -1,24 +1,27 @@ -; Namespace + ; Namespace (namespace_definition) @namespace ; Includes -[ "include" +[ "cpp_include" ] @include (include_path) @string +(package_path) @string ; Types -(primitive_type) @type.builtin +(primitive) @type.builtin [ "list" "map" "set" + "sink" + "stream" "void" ] @type.builtin @@ -81,6 +84,7 @@ "exception" "extends" "include" + "interaction" "namespace" "oneway" "optional" @@ -96,7 +100,6 @@ [ "async" - "byte" "cocoa_prefix" "cpp_namespace" "csharp_namespace" @@ -115,10 +118,28 @@ "xsd_optional" ] @keyword +; Extended Kewords +[ + "client" + "idempotent" + "package" + "performs" + "permanent" + "readonly" + "server" + "safe" + "stateful" + "transient" +] @keyword ; Literals -(string_literal) @string +[ + (annotation_value) + (string) +] @string + +(escape_sequence) @string.escape (uri) @string.special @@ -129,22 +150,27 @@ (boolean) @boolean ; Typedefs + (typedef_definition) @type.definition (namespace_scope) @type.definition -; Misc +; Qualifiers [ "const" + (exception_modifier) + (field_modifier) + (function_modifier) ] @type.qualifier +; Punctuation + [ "*" "&" + "@" ] @punctuation.special -(field_modifier) @attribute - ["{" "}"] @punctuation.bracket ["(" ")"] @punctuation.bracket -- cgit v1.2.3-70-g09d2