Added skeleton Common Lisp package.

This commit is contained in:
Simon Brooke 2019-09-12 14:08:26 +01:00
parent 78c15dbed6
commit 95f6c3bdbb
10 changed files with 110 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.lisp#

View file

@ -9,5 +9,7 @@ There is nothing here yet. You cannot use it. It is just a very rough plan.
There is the beginnings of a Clojure implementation. This is probably just proof-of-concept rapid prototyping. Clojure makes it extremely hard to rebind symbols, so in-core editing of Clojure is going to be pretty hard to make work. It's highly likely that working LEdit will be Common Lisp only.
## Common Lisp implementation
There is the beginnings of a Common Lisp implementation. This will probably lag the Clojure implementation largely because I am personally more familiar with Clojure, but the long term aim is to get the Common Lisp implementation to a stage where it is a robust and usable tool.

5
README.org Normal file
View file

@ -0,0 +1,5 @@
* Ledit
** Usage
** Installation

17
ledit-test.asd Normal file
View file

@ -0,0 +1,17 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
#|
This file is a part of ledit project.
|#
(defsystem "ledit-test"
:defsystem-depends-on ("prove-asdf")
:author ""
:license ""
:depends-on ("ledit"
"prove")
:components ((:module "tests"
:components
((:test-file "ledit"))))
:description "Test system for ledit"
:perform (test-op (op c) (symbol-call :prove-asdf :run-test-system c)))

25
ledit.asd Normal file
View file

@ -0,0 +1,25 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
#|
This file is a part of ledit project.
|#
(in-package :cl-user)
(defpackage :ledit-asd
(:use :cl :asdf))
(in-package :ledit-asd)
(defsystem "ledit"
:version "0.1.0"
:author "Simon Brooke <simon@journeyman.cc>"
:license "GNU General Public License, version 2.0 or (at your option) any later version"
:depends-on ("xmls")
:components ((:module "src/lisp"
:components
((:file "ledit"))))
:description "A browser-based Lisp structure editor"
:long-description
#.(read-file-string
(subpathname *load-pathname* "README.md"))
:in-order-to ((test-op (test-op "ledit-test"))))

View file

@ -0,0 +1,33 @@
<!-- in theory this should exactly translate into `defun-fact.lisp`, q.v. -->
<div class="sexpr list">
<var class="sexpr symbol">defun</var>
<var class="sexpr symbol">fact</var>
<div class="sexpr list">
<var class="sexpr symbol">n</var>
</div>
<div class="sexpr list">
<var class="sexpr symbol">cond</var>
<div class="sexpr list">
<div class="sexpr list">
<var class="sexpr symbol">zerop</var>
<var class="sexpr symbol">n</var>
</div>
<code class="sexpr number">1</code>
</div>
<div class="sexpr list">
<var class="sexpr symbol">t</var>
<div class="sexpr list">
<var class="sexpr symbol">*</var>
<var class="sexpr symbol">n</var>
<div class="sexpr list">
<var class="sexpr symbol">fact</var>
<div class="sexpr list">
<var class="sexpr symbol">1-</var>
<var class="sexpr symbol">n</var>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,5 @@
;; In theory this should exactly translate into `defun-fact.html`, q.v.
(defun fact (n)
(cond ((zerop n) 1)
(t (* n (fact (1- n))))))

View file

@ -0,0 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
(defpackage ledit
(:use :cl :xmls))
(in-package :ledit)
;; blah blah blah.

13
test/lisp/ledit.lisp Normal file
View file

@ -0,0 +1,13 @@
(defpackage ledit-test
(:use :cl
:ledit
:prove))
(in-package :ledit-test)
;; NOTE: To run this test file, execute `(asdf:test-system :ledit)' in your Lisp.
(plan nil)
;; blah blah blah.
(finalize)

1
tests/ledit.lisp Symbolic link
View file

@ -0,0 +1 @@
../test/lisp/ledit.lisp