mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-05 04:45:46 +01:00
Fix io.source heredoc parsing in FF36. Closes issue #32.
This commit is contained in:
@@ -362,11 +362,15 @@ lookup:
|
||||
|
||||
this.readHeredoc = function (end) {
|
||||
let res = [];
|
||||
for (let [i, line] in iter)
|
||||
if (line === end)
|
||||
return res.join("\n");
|
||||
else
|
||||
res.push(line);
|
||||
try {
|
||||
while (true)
|
||||
let ([i, line] = iter.next()) {
|
||||
if (line === end)
|
||||
return res.join("\n");
|
||||
res.push(line);
|
||||
}
|
||||
}
|
||||
catch (e if e instanceof StopIteration) {}
|
||||
dactyl.assert(false, "Unexpected end of file waiting for " + end);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user