summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-09-07 20:09:44 +0200
committerThomas Vigouroux <tomvig38@gmail.com>2020-09-08 22:02:39 +0200
commit8bc5d1ff3fc79ca4a54965730dcddf17f9d6f026 (patch)
treeb618e150b1f32d3f6ab4794ff1b81426f2ede0fc
parent3c1399b94eb79399e0af80b2d1cc804c34e965d0 (diff)
Add C++ folds and C comment/preproc folds
-rw-r--r--queries/c/fold.scm6
-rw-r--r--queries/cpp/fold.scm9
2 files changed, 15 insertions, 0 deletions
diff --git a/queries/c/fold.scm b/queries/c/fold.scm
index 403530f2..5e76f37e 100644
--- a/queries/c/fold.scm
+++ b/queries/c/fold.scm
@@ -4,4 +4,10 @@
(while_statement)
(translation_unit)
(function_definition)
+ (struct_specifier)
+ (comment)
+ (preproc_if)
+ (preproc_elif)
+ (preproc_else)
+ (preproc_ifdef)
] @fold
diff --git a/queries/cpp/fold.scm b/queries/cpp/fold.scm
new file mode 100644
index 00000000..f4341201
--- /dev/null
+++ b/queries/cpp/fold.scm
@@ -0,0 +1,9 @@
+[
+ (for_range_loop)
+ (class_specifier)
+ (template_declaration)
+ (namespace_definition)
+ (try_statement)
+ (catch_clause)
+ (lambda_expression)
+] @fold