(not (ps-special-form-p form))
(not (null (op-precedence (first form))))))
+(defun method-call-form-p (form)
+ (and (listp form)
+ (symbolp (car form))
+ (char= #\. (char (symbol-name (car form)) 0))))
+
(defun funcall-form-p (form)
(and form
(listp form)
(ps-compile-expression (ps-macroexpand form)))
(cdr form))))
+(defun compile-method-call-form (form)
+ (compile-funcall-form
+ `((js:slot-value ,(second form)
+ ',(make-symbol (subseq (symbol-name (first form)) 1)))
+ ,@(cddr form))))
+
(defun compile-funcall-form (form)
`(js:funcall
,(if (symbolp (car form))
(compile-op-form form))))
((op-form-p form)
(compile-op-form form))
+ ((method-call-form-p form)
+ (compile-method-call-form form))
((funcall-form-p form)
(compile-funcall-form form))
- (t (error "Cannot compile ~S to a ParenScript form." form))))))
+ (t (error "Cannot compile ~S to a ParenScript form." form))))))
(defun ps-compile-statement (form)
(let ((compile-expression? nil))