Skip to content

Commit

Permalink
The actual code.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoore committed Sep 21, 2015
1 parent 4dca9e8 commit 3b4b9f8
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

Pikey is a Javascript compiler using Parenscript.

It's work in progress. To build it, you need SBCL and quicklisp. Then evaluate

(asdf:operate :program-op :pikey)

and look in your fasl cache for the executable. I haven't looked up how to put
it in the current working directory yet.

Your fasl cache is usually ~/.cache/common-lisp/<sbcl|ccl|whatver>/path/to/source/etc.

7 changes: 7 additions & 0 deletions package.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
;;;; package.lisp

(defpackage #:pikey
(:use #:cl
#:parenscript)
(:export :main))

19 changes: 19 additions & 0 deletions pikey.asd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
;;;; pikey.asd

(asdf:defsystem #:pikey
:description "Describe pikey here"
:author "Your Name <[email protected]>"
:license "Specify license here"
:serial t


:depends-on (#:cl-fad
#:apply-argv
#:parenscript)

:components ((:file "package")
(:file "pikey"))

:build-pathname "pikey"
:entry-point "pikey:main")

18 changes: 18 additions & 0 deletions pikey.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

(in-package #:pikey)

(eval-when (:compile-toplevel :load-toplevel)
(defpsmacro gebi (element-id)
`((@ document get-Element-By-Id) ,element-id)))

(defun main ()
(let* ((args (apply-argv:parse-argv (cdr sb-ext:*posix-argv*)))
(in-file (getf args :i))
(out-file (getf args :o))
(load-file (getf args :l)))
(when (probe-file load-file)
(setf *load-verbose* t)
(setf *load-print* t)
(load load-file))
(with-open-file (f out-file :if-exists :supersede :direction :output)
(write-string (ps:ps-compile-file in-file) f))))

0 comments on commit 3b4b9f8

Please sign in to comment.