fix initialization options ignoring symbol splitting
This commit is contained in:
parent
fe3fd3340d
commit
13b75260b2
@ -209,12 +209,9 @@ initialization-opts: {:stack ?list[ast]
|
|||||||
;; and the stack has ["baz" "bar"]. "bar" is at the "top"/"end" of the stack as the next key to search.
|
;; and the stack has ["baz" "bar"]. "bar" is at the "top"/"end" of the stack as the next key to search.
|
||||||
(if (sym? ast)
|
(if (sym? ast)
|
||||||
;; when your search starts as a symbol, there's lots of special interesting things to consider
|
;; when your search starts as a symbol, there's lots of special interesting things to consider
|
||||||
(let [stack
|
(let [stack (let [?byte initialization-opts.byte
|
||||||
(if initialization-opts.stack
|
split (utils.multi-sym-split ast (if ?byte (- ?byte ast.bytestart)))]
|
||||||
initialization-opts.stack
|
(stack-add-split! (or initialization-opts.stack []) split))]
|
||||||
(let [?byte initialization-opts.byte
|
|
||||||
split (utils.multi-sym-split ast (if ?byte (- ?byte ast.bytestart)))]
|
|
||||||
(stack-add-split! [] split)))]
|
|
||||||
(case (docs.get-builtin server (utils.multi-sym-base ast))
|
(case (docs.get-builtin server (utils.multi-sym-base ast))
|
||||||
document (search-document server document stack opts)
|
document (search-document server document stack opts)
|
||||||
_ (case (. file.macro-refs ast)
|
_ (case (. file.macro-refs ast)
|
||||||
|
|||||||
@ -124,6 +124,13 @@
|
|||||||
(check "package.loaded.mymodule io.stderr.write"
|
(check "package.loaded.mymodule io.stderr.write"
|
||||||
[]
|
[]
|
||||||
[{:code :unknown-module-field}])
|
[{:code :unknown-module-field}])
|
||||||
|
;; regression test
|
||||||
|
(check {:numbers.fnl "{:field [1 2 3]}"
|
||||||
|
:main.fnl "(local n (require :numbers))
|
||||||
|
(local [one two three] n.field)
|
||||||
|
(print one two three)"}
|
||||||
|
[]
|
||||||
|
[{:code :unknown-module-field}])
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
(fn test-unnecessary-method []
|
(fn test-unnecessary-method []
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user