update include
This commit is contained in:
parent
0f2acc0d0e
commit
a559269b2d
@ -22,7 +22,7 @@ function Lisp (input, lib) {
|
|||||||
include: (input, context) => {
|
include: (input, context) => {
|
||||||
if (!input[1].value || !fs.existsSync(input[1].value)) { console.warn('Source', input[1].value); return [] }
|
if (!input[1].value || !fs.existsSync(input[1].value)) { console.warn('Source', input[1].value); return [] }
|
||||||
const file = fs.readFileSync(input[1].value, { encoding: 'utf-8' })
|
const file = fs.readFileSync(input[1].value, { encoding: 'utf-8' })
|
||||||
return interpret(this.parse(file), context)
|
return interpret(this.parse(`(${file})`), context)
|
||||||
},
|
},
|
||||||
let: function (input, context) {
|
let: function (input, context) {
|
||||||
const letContext = input[1].reduce(function (acc, x) {
|
const letContext = input[1].reduce(function (acc, x) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user