Skip to content

Commit

Permalink
Merge pull request armedbear#483 from alanruttenberg/patch-javaparser…
Browse files Browse the repository at this point in the history
…-huh

getField->getName bugfix for javaparser
  • Loading branch information
alanruttenberg authored Apr 12, 2022
2 parents 933fbb1 + e0bfbad commit f60ba2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions contrib/jss/javaparser.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
(let ((symbol (intern (#"getIdentifier" node))))
symbol))

(def-java-read NameExpr javaparser ()
(let ((symbol (intern (#"getIdentifier" (#"getName" node)))))
symbol))

(eval-when (:compile-toplevel :load-toplevel :execute)
(defun read-invoke/javaparser (stream char arg)
(if (eql arg 1)
Expand Down
4 changes: 2 additions & 2 deletions contrib/jss/read-sharp-quote-expression.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
(def-java-read FieldAccessExpr sharp-quote-expression-reader ()
(let ((scope (process-node obj (#"getScope" node))))
(if (and (symbolp scope) (upper-case-p (char (string scope) 0)))
`(get-java-field ',(process-node obj (#"getScope" node)) ,(#"getIdentifier" (#"getField" node)) t)
`(get-java-field ,(maybe-class (process-node obj (#"getScope" node))) ,(#"getIdentifier" (#"getField" node)) t))))
`(get-java-field ',(process-node obj (#"getScope" node)) ,(#"getIdentifier" (#"getName" node)) t)
`(get-java-field ,(maybe-class (process-node obj (#"getScope" node))) ,(#"getIdentifier" (#"getName" node)) t))))

(def-java-read ArrayAccessExpr sharp-quote-expression-reader ()
(let ((index (process-node obj (#"getIndex" node))))
Expand Down

0 comments on commit f60ba2b

Please sign in to comment.