grass.el(0.1.8) > defun grass-eval-code-internal

概要

  • grass code の実行を行う

引数

  • code: grass形式のLIST

実装

(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


呼出元

コメント:


履歴

  • 作者:kobapan
  • 日付:2009/01/03
  • 対象:
更新日 更新者 更新内容

コメント


名前:
コメント:
最終更新:2009年01月10日 15:04