Unbreak repl string output (#300)
- fix incorrect argument in s = `JSON.stringify(s);` - add closures for `RegExp` and `JSON`
This commit is contained in:
parent
33e38bec00
commit
8d0d9391f9
2 changed files with 6675 additions and 6662 deletions
13333
gen/repl.c
13333
gen/repl.c
File diff suppressed because it is too large
Load diff
4
repl.js
4
repl.js
|
@ -35,7 +35,9 @@ import * as os from "os";
|
||||||
var String = g.String;
|
var String = g.String;
|
||||||
var Array = g.Array;
|
var Array = g.Array;
|
||||||
var Date = g.Date;
|
var Date = g.Date;
|
||||||
|
var RegExp = g.RegExp;
|
||||||
var Math = g.Math;
|
var Math = g.Math;
|
||||||
|
var JSON = g.JSON;
|
||||||
var isFinite = g.isFinite;
|
var isFinite = g.isFinite;
|
||||||
var parseFloat = g.parseFloat;
|
var parseFloat = g.parseFloat;
|
||||||
|
|
||||||
|
@ -977,7 +979,7 @@ import * as os from "os";
|
||||||
stack.pop(a);
|
stack.pop(a);
|
||||||
}
|
}
|
||||||
} else if (type === "string") {
|
} else if (type === "string") {
|
||||||
s = JSON.stringify(s);
|
s = JSON.stringify(a);
|
||||||
if (s.length > 79)
|
if (s.length > 79)
|
||||||
s = s.substring(0, 75) + "...\"";
|
s = s.substring(0, 75) + "...\"";
|
||||||
std.puts(s);
|
std.puts(s);
|
||||||
|
|
Loading…
Reference in a new issue