From 2c5288dafb88ae2a12d3589b79a525932f48b6b3 Mon Sep 17 00:00:00 2001 From: Álan Crístoffer Date: Fri, 23 Jun 2023 00:19:40 +0200 Subject: Replace MATLAB grammar (#7388) --- runtime/queries/matlab/context.scm | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 runtime/queries/matlab/context.scm (limited to 'runtime/queries/matlab/context.scm') diff --git a/runtime/queries/matlab/context.scm b/runtime/queries/matlab/context.scm new file mode 100644 index 00000000..725c10ca --- /dev/null +++ b/runtime/queries/matlab/context.scm @@ -0,0 +1,41 @@ +(function_definition + (block (_) @context.end) +) @context + +(while_statement + (block (_) @context.end) +) @context + +(for_statement + (block (_) @context.end) +) @context + +(if_statement + (block (_) @context.end) +) @context + +(elseif_clause + (block (_) @context.end) +) @context + +(else_clause + (block (_) @context.end) +) @context + +(switch_statement) @context + +(case_clause + (block (_) @context.end) +) @context + +(otherwise_clause + (block (_) @context.end) +) @context + +(try_statement + "try" + (block (_) @context.end) @context + "end") +(catch_clause + "catch" + (block (_) @context.end) @context) -- cgit v1.2.3-70-g09d2