From c5613b87ab91b845b628d9201ad053da92912838 Mon Sep 17 00:00:00 2001 From: Frank Duncan Date: Sun, 7 Jun 2015 23:08:50 -0500 Subject: [PATCH] First ugly pass of show --- src/main/nvm.lisp | 3 +++ src/main/parse.lisp | 4 ++++ src/main/transpile.lisp | 1 + 3 files changed, 8 insertions(+) diff --git a/src/main/nvm.lisp b/src/main/nvm.lisp index 011eb6d..de63bf1 100644 --- a/src/main/nvm.lisp +++ b/src/main/nvm.lisp @@ -7,6 +7,9 @@ (defstruct turtle who color heading) (defvar *turtles* nil) +(defun show (n) + (format t "Showing: ~A~%" n)) + (defun create-turtle () (push (make-turtle :who *current-id* diff --git a/src/main/parse.lisp b/src/main/parse.lisp index ced5470..40be292 100644 --- a/src/main/parse.lisp +++ b/src/main/parse.lisp @@ -57,4 +57,8 @@ *prims*)) ; This list of prims will get combined with the mapping to actual code later +; Current list of argument types we accept: +; - :number +; - t - any type (defprim :crt (:number)) +(defprim :show (t)) diff --git a/src/main/transpile.lisp b/src/main/transpile.lisp index 159a217..80fe4af 100644 --- a/src/main/transpile.lisp +++ b/src/main/transpile.lisp @@ -48,3 +48,4 @@ ; We count on the parser to handle arguemnts for us, when collating things. (defprim :crt :command cl-nl.nvm::create-turtles) +(defprim :show :command cl-nl.nvm::show) -- 2.25.1