Skip to content

Commit da309f0

Browse files
committed
fix: get rid of quadratic queries
1 parent a947cb8 commit da309f0

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

languages/nu.scm

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,20 +192,25 @@
192192
;; new-line
193193
(comment) @prepend_input_softline @append_hardline
194194

195-
;; TODO: substantial slow down by duplicated rules
196195
(nu_script
197-
(_)
198-
(_) @prepend_input_softline
196+
(_) @append_begin_scope
197+
.
198+
(_) @prepend_end_scope @prepend_empty_scoped_softline
199+
(#scope_id! "consecutive_scope")
199200
)
200201

201202
(block
202-
(_)
203-
(_) @prepend_input_softline
203+
(_) @append_begin_scope
204+
.
205+
(_) @prepend_end_scope @prepend_empty_scoped_softline
206+
(#scope_id! "consecutive_scope")
204207
)
205208

206209
(val_closure
207-
(_)
208-
(_) @prepend_input_softline
210+
(_) @append_begin_scope
211+
.
212+
(_) @prepend_end_scope @prepend_empty_scoped_softline
213+
(#scope_id! "consecutive_scope")
209214
)
210215

211216
;; control flow

0 commit comments

Comments
 (0)