Skip to content

Commit 21ea90d

Browse files
committed
[PortsJS]load stdlib
1 parent 87f609c commit 21ea90d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ports-js/scheme.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { parseWithoutExpand } from './parser.js';
22

3-
import { readFileSync } from 'fs';
3+
import { readFile, readFileSync } from 'fs';
44
import URL from 'url';
55

66
// Use JavaScript native Symbol instead of custom implementation
@@ -360,6 +360,8 @@ export function evalScheme(list) {
360360

361361
addGlobals(globalEnv);
362362

363+
var stdlibConent = readFileSync('ports/stdlib.scm', 'utf8')
364+
evalSchemeString(stdlibConent);
363365

364366
function main() {
365367
console.log(evalSchemeString("(+ (* 2 3) 2)")); // Should output 3

0 commit comments

Comments
 (0)