Skip to content

Commit

Permalink
fix(nim): added new fields from recent parser version,
Browse files Browse the repository at this point in the history
improved support for (conditional_declaration) and (variant_declaration)
  • Loading branch information
aMOPel committed Dec 16, 2023
1 parent cfa8ee1 commit 7954670
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions queries/nim/context.scm
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,26 @@

; multi line statements
(try body: (statement_list) @context.end) @context
(except_branch (statement_list) @context.end) @context
(finally_branch (statement_list) @context.end) @context
(except_branch consequence: (statement_list) @context.end) @context
(finally_branch body: (statement_list) @context.end) @context

(if consequence: (statement_list) @context.end) @context
(when consequence: (statement_list) @context.end) @context
(elif_branch (statement_list) @context.end) @context
(else_branch (statement_list) @context.end) @context
(conditional_declaration consequence: (field_declaration_list) @context.end) @context
(elif_branch
consequence: [
(statement_list)
(field_declaration_list)
] @context.end) @context
(else_branch
consequence: [
(statement_list)
(field_declaration_list)
] @context.end) @context
(case value: (_) . (_) @context.end) @context
(of_branch (statement_list) @context.end) @context
(variant_declaration (variant_discriminator_declaration) . (_) @context.end) @context
(of_branch
consequence: [
(statement_list)
(field_declaration_list)
] @context.end) @context

0 comments on commit 7954670

Please sign in to comment.