Skip to content

Commit

Permalink
stdを戻した
Browse files Browse the repository at this point in the history
  • Loading branch information
ikasoba committed Sep 10, 2023
1 parent 026e155 commit b753537
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 182 deletions.
9 changes: 8 additions & 1 deletion src/interpreter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ export class Interpreter {
})),
};

this.vars = { ...vars, ...std, ...io };
this.vars = {
...vars,
...Object.fromEntries(
Object.entries(std)
.map(([k, v]) => [k, Variable.const(v)]),
),
...io,
};

this.scope = new Scope([new Map(Object.entries(this.vars))]);
this.scope.opts.log = (type, params): void => {
Expand Down
Loading

0 comments on commit b753537

Please sign in to comment.