Added support for λ

This commit is contained in:
Devine Lu Linvega
2019-07-21 09:52:37 +09:00
parent 3ea7fff85f
commit 938a9d22ec
6 changed files with 25 additions and 24 deletions

View File

@@ -153,7 +153,7 @@ function Lisp (lib = {}, includes = []) {
}
const tokenize = function (input) {
const i = input.replace(/^\;.*\n?/gm, '').split('"')
const i = input.replace(/^\;.*\n?/gm, '').replace('λ','lambda ').split('"')
return i.map(function (x, i) {
return i % 2 === 0
? x.replace(/\(/g, ' ( ')