workaround for fennel#221
This commit is contained in:
parent
e37c77958d
commit
3dc9e36af6
@ -343,7 +343,8 @@ identifiers are declared / referenced in which places."
|
|||||||
|
|
||||||
(λ parsed [ast]
|
(λ parsed [ast]
|
||||||
"runs on every ast tree that was parsed"
|
"runs on every ast tree that was parsed"
|
||||||
(if (sym? ast)
|
;; TODO in fennel 1.5+, bug fennel#221 will be fixed, and all syms in the ast should have a bytestart
|
||||||
|
(if (and (sym? ast) ast.bytestart)
|
||||||
(case (values (tostring ast) (file.text:sub ast.bytestart ast.bytestart))
|
(case (values (tostring ast) (file.text:sub ast.bytestart ast.bytestart))
|
||||||
(where (:hashfn "#"))
|
(where (:hashfn "#"))
|
||||||
(table.insert defer #(set ast.byteend ast.bytestart))
|
(table.insert defer #(set ast.byteend ast.bytestart))
|
||||||
|
|||||||
@ -39,6 +39,7 @@
|
|||||||
(create-client-with-files "(macro foo {} nil)
|
(create-client-with-files "(macro foo {} nil)
|
||||||
(λ test {} nil)
|
(λ test {} nil)
|
||||||
(λ {} nil")
|
(λ {} nil")
|
||||||
|
(create-client-with-files "(fn foo []\n #\n (print :test))")
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
(fn test-split-spaces []
|
(fn test-split-spaces []
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user