Skip to content

Commit

Permalink
feat: hook into analyze_host_expr
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronsa committed Oct 18, 2024
1 parent f2c6747 commit 5374a89
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@
(defn analyze-host-expr
"Performing some reflection, transforms :host-interop/:host-call/:host-field
nodes in either: :static-field, :static-call, :instance-call, :instance-field
or :host-interop nodes, and a :var or :maybe-class node in a :const :class node,
if necessary (class literals shadow Vars).
or :host-interop nodes, and a :var/:maybe-class/:maybe-host-form node in a
:const :class node, if necessary (class literals shadow Vars).
A :host-interop node represents either an instance-field or a no-arg instance-method. "
{:pass-info {:walk :post :depends #{}}}
Expand Down Expand Up @@ -189,4 +189,10 @@
(assoc (ana/analyze-const the-class env :class) :form form)
ast)

:maybe-host-form
(if-let [the-class (maybe-array-class-sym (symbol (str (:class ast))
(str (:field ast))))]
(assoc (ana/analyze-const the-class env :class) :form form)
ast)

ast))

0 comments on commit 5374a89

Please sign in to comment.