Skip to content

Commit

Permalink
Complete renaming to Little Lisp.
Browse files Browse the repository at this point in the history
  • Loading branch information
maryrosecook committed Jul 10, 2013
1 parent 960edc4 commit 2a2c68f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# Tiny Lisp
# Little Lisp

A mini Lisp compiler in JavaScript. Supports lists (obvs), function invocation, lambdas, lets, if statements, numbers, strings and the library functions `first`, `rest` and `print`.

Expand Down
6 changes: 3 additions & 3 deletions tinylisp.js → littlelisp.js
Expand Up @@ -128,7 +128,7 @@
return parenthesize(tokenize(input));
};

exports.tinyLisp = {};
exports.tinyLisp.parse = parse;
exports.tinyLisp.interpret = interpret;
exports.littleLisp = {};
exports.littleLisp.parse = parse;
exports.littleLisp.interpret = interpret;
})(typeof exports === 'undefined' ? this : exports);
6 changes: 3 additions & 3 deletions tinylisp.spec.js → littlelisp.spec.js
@@ -1,4 +1,4 @@
var t = require('./tinylisp').tinyLisp;
var t = require('./littlelisp').littleLisp;

var is = function(input, type) {
return Object.prototype.toString.call(input) === '[object ' + type + ']';
Expand All @@ -19,7 +19,7 @@ var unannotate = function(input) {
}
};

describe('tinyLisp', function() {
describe('littleLisp', function() {
describe('parse', function() {
it('should lex an atom in a list', function() {
expect(unannotate(t.parse("()"))).toEqual([]);
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('tinyLisp', function() {

it('should not expose parallel bindings to each other', function() {
// Expecting undefined for y to be consistent with normal
// identifier resolution in tinyLisp.
// identifier resolution in littleLisp.
expect(t.interpret(t.parse("(let ((x 1) (y x)) (x y))"))).toEqual([1, undefined]);
});

Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "tinylisp",
"description": "An interpreter for a tiny lisp.",
"name": "littlelisp",
"description": "An interpreter for a little lisp.",
"author": "Mary Rose Cook <maryrosecook@maryrosecook.com> (http://maryrosecook.com/)",
"version": "0.1.0",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions repl.js
@@ -1,12 +1,12 @@
var repl = require("repl");
var tinyLisp = require("./tinylisp").tinyLisp;
var littleLisp = require("./littlelisp").littleLisp;

repl.start({
prompt: "> ",
eval: function(cmd, context, filename, callback) {
if (cmd !== "(\n)") {
cmd = cmd.slice(1, -2); // rm parens and newline added by repl
var ret = tinyLisp.interpret(tinyLisp.parse(cmd));
var ret = littleLisp.interpret(littleLisp.parse(cmd));
callback(null, ret);
} else {
callback(null);
Expand Down

0 comments on commit 2a2c68f

Please sign in to comment.