Created
December 6, 2012 16:00
-
-
Save psihy/4225578 to your computer and use it in GitHub Desktop.
FFI in BiwaScheme.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; JavaScript の関数を呼び出す | |
;; e.g. rosso(fantasma) | |
(js-call (js-eval "rosso") fantasma) | |
;; クラスのインスタンスを生成する | |
;; e.g. new Tiro(finale) | |
(js-new "Tiro" finale) | |
;; クラスのメソッドを呼び出す | |
;; e.g. homu.attack(baretter, eagle, remington, m249) | |
(js-invoke homu "attack" baretta eagle remington m249) | |
;; クラスのメンバを参照する | |
;; e.g. walpurgis.night | |
(js-ref walpurgis "night") | |
;; クラスのメンバに代入する | |
;; e.g. magical.sayaka = "oktavia" | |
(js-set! magical "sayaka" "oktavia") | |
;; クラスのメンバに関数を渡す | |
;; e.g. goddess.madoka = function () { ... | |
(js-set! goddess "madoka" (js-closure (lambda () ... | |
;; 外部ファイルを読み込む | |
(js-load "mamisan.scm") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment