Skip to content

Commit

Permalink
update vec_lit
Browse files Browse the repository at this point in the history
  • Loading branch information
grierson committed Aug 14, 2023
1 parent 9b10e12 commit 25f9d89
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/sample.fnl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(fn print-and-add [a b c]
"doc string"
(+ b c))

(fn print-and-add2 [a b c]
"doc string"
(+ b c))

[1 :a]
8 changes: 8 additions & 0 deletions docs/sample.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- [nfnl] Compiled from docs/sample.fnl by https://github.com/Olical/nfnl, do not edit.
local function print_and_add(a, b, c)
return (b + c)
end
local function print_and_add2(a, b, c)
return (b + c)
end
return {1, "a"}
8 changes: 6 additions & 2 deletions queries/clojure/textobjects.scm
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
([(list_lit)
[(list_lit)
(quoting_lit)
(vec_lit)
(set_lit)
(anon_fn_lit)
(map_lit)] @form.outer)
(map_lit)] @form.outer

; ((list_lit . value: (_) @_start value: (_) @_end .)
; (#make-range! "form.inner" @_start @_end))

((vec_lit . value: (_) @_start value: (_) @_end .)
(#make-range! "form.inner" @_start @_end))

; -- Fails: List or Vector inner range
; (([list_lit vec_lit] . value: (_) @start value: (_) @end .)
; (#make-range! "form.inner" @start @end))

0 comments on commit 25f9d89

Please sign in to comment.