概要
引数
実装
(defun grass-eval-code-internal (code)
(let ((standard-output standard-output))
;; Open the Evaluation Window
(unless noninteractive
(let ((outbuf (get-buffer grass-evaluation-buffer-name)))
(if outbuf
(with-current-buffer outbuf
(setq buffer-read-only nil)
(erase-buffer))
(setq outbuf (get-buffer-create grass-evaluation-buffer-name)))
(with-current-buffer outbuf
(buffer-disable-undo)
(make-local-variable 'truncate-partial-width-windows)
(setq truncate-partial-width-windows nil))
(setq standard-output outbuf)
(display-buffer outbuf))
(message "Evaluate Grass code..."))
;; Set the Initial State
(let ((env grass-initial-env)
(dump grass-initial-dump)
state)
(setq grass-out-counter 0
grass-out-prev-char nil)
;; Main Loop
;; (C0, E0, D0) →* (・, f :: ・, ・)
(while (or code dump)
(setq state (grass-eval-machine code env dump)
code (car state)
env (cadr state)
dump (nth 2 state))
))
(unless noninteractive
(message "Done!"))
nil)) ;; Return value
呼出元
履歴
コメント
最終更新:2009年01月10日 15:04