File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 121
121
:line-end end-line
122
122
:col-beg column
123
123
:col-end end-column})))))
124
- gather (fn [info]
125
- (merge info
126
- {:file (.getCanonicalPath file)
127
- :name fully-qualified-name
128
- :match (match file-content
129
- (:line-beg info)
130
- (:line-end info))}))]
131
- (map gather locs)))
124
+ gather (fn [{:keys [line-beg line-end] :as info}]
125
+ (some-> info
126
+ (merge
127
+ {:file (.getCanonicalPath file)
128
+ :name fully-qualified-name
129
+ :match (match file-content line-beg line-end)})))]
130
+ (keep gather locs)))
132
131
133
132
(defn- find-global-symbol [file ns var-name ignore-errors]
134
133
(let [namespace (or ns (core/ns-from-string (slurp file)))
220
219
first
221
220
:name )
222
221
local-occurrences
223
- (map #(merge %
224
- {:name var-name
225
- :file (.getCanonicalPath (java.io.File. file))
226
- :match (match file-content
227
- (:line-beg %)
228
- (:line-end %))})
222
+ (map (fn [{:keys [line-beg line-end] :as m}]
223
+ (merge m
224
+ {:name var-name
225
+ :file (.getCanonicalPath (java.io.File. file))
226
+ :match (match file-content line-beg line-end)}))
229
227
(find-nodes var-name
230
228
[top-level-form-ast]
231
229
#(and (#{:local :binding } (:op %))
You can’t perform that action at this time.
0 commit comments