From bdf43b15df799ae12fadd4eb214e13704454dd98 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 3 Sep 2020 11:09:57 -0500 Subject: Python: add folds --- queries/python/fold.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 queries/python/fold.scm (limited to 'queries/python') diff --git a/queries/python/fold.scm b/queries/python/fold.scm new file mode 100644 index 000000000..22e03b426 --- /dev/null +++ b/queries/python/fold.scm @@ -0,0 +1,24 @@ +(function_definition (block) @fold) +(class_definition (block) @fold) + +(while_statement (block) @fold) +(for_statement (block) @fold) +(if_statement (block) @fold) +(with_statement (block) @fold) +(try_statement (block) @fold) + +[ + (import_from_statement) + (parameters) + + (parenthesized_expression) + (generator_expression) + (list_comprehension) + (set_comprehension) + (dictionary_comprehension) + + (tuple) + (list) + (set) + (dictionary) +] @fold -- cgit v1.2.3-70-g09d2