Generate Java code to build a Java
We generate a character literal if the character is below 256,
since currently our Java abstract syntax
only supports 8-bit character literals.
Otherwise, we cast the value to
Function:
(defun atj-gen-jchar (char) (declare (xargs :guard (ubyte16p char))) (let ((__function__ 'atj-gen-jchar)) (declare (ignorable __function__)) (if (< char 256) (jexpr-literal-character (code-char char)) (jexpr-cast (jtype-char) (jexpr-lit-int-dec-nouscores char)))))
Theorem:
(defthm jexprp-of-atj-gen-jchar (b* ((expr (atj-gen-jchar char))) (jexprp expr)) :rule-classes :rewrite)