Skip to content

Commit bb25142

Browse files
committed
refactor bootstrap in Node REPL
1 parent 0899018 commit bb25142

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

bin/lips.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ function print(result) {
119119
// -----------------------------------------------------------------------------
120120
function bootstrap(interpreter) {
121121
const file = options.bootstrap ? options.bootstrap : './dist/std.xcb';
122-
const list = [file];
123122
function read(name) {
124123
var path;
125124
try {
@@ -133,15 +132,8 @@ function bootstrap(interpreter) {
133132
}
134133
return readCode(path);
135134
}
136-
return (function next() {
137-
var name = list.shift();
138-
if (name) {
139-
const code = read(name);
140-
return run(code, interpreter, false, env.__parent__, true).then(next);
141-
} else {
142-
return Promise.resolve();
143-
}
144-
})();
135+
const code = read(file);
136+
return run(code, interpreter, false, env.__parent__, true);
145137
}
146138

147139
// -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)