aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/cpp
diff options
context:
space:
mode:
authorSam McCall2023-01-11 01:57:10 +0000
committerGitHub2023-01-11 01:57:10 +0000
commita8248c50e1017cbba42c602d480d3c4ffa7162a0 (patch)
treec276158975c2739785a0040904fdc97eb746c461 /runtime/queries/cpp
parente65f28d41af0b095eb7ff340f20c7d0d4193e287 (diff)
Update tree-sitter-cpp, support injections in tagged rawstrings (#5457)
The grammar now exposes the delimiter of raw-strings. We can now inject the inner grammar in cases like: const char* script = R"js( alert('hello world!'); )js";
Diffstat (limited to 'runtime/queries/cpp')
-rw-r--r--runtime/queries/cpp/injections.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/queries/cpp/injections.scm b/runtime/queries/cpp/injections.scm
index a5a5208c..fb783bb6 100644
--- a/runtime/queries/cpp/injections.scm
+++ b/runtime/queries/cpp/injections.scm
@@ -1 +1,4 @@
; inherits: c
+(raw_string_literal
+ delimiter: (raw_string_delimiter) @injection.language
+ (raw_string_content) @injection.content)