1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-23 13:15:46 +01:00

Fix io.source heredoc parsing in FF36. Closes issue #32.

This commit is contained in:
Kris Maglione
2010-09-29 11:46:02 -04:00
parent b711f928bf
commit de3d43292e

View File

@@ -362,11 +362,15 @@ lookup:
this.readHeredoc = function (end) { this.readHeredoc = function (end) {
let res = []; let res = [];
for (let [i, line] in iter) try {
if (line === end) while (true)
return res.join("\n"); let ([i, line] = iter.next()) {
else if (line === end)
res.push(line); return res.join("\n");
res.push(line);
}
}
catch (e if e instanceof StopIteration) {}
dactyl.assert(false, "Unexpected end of file waiting for " + end); dactyl.assert(false, "Unexpected end of file waiting for " + end);
}; };