mozilla/sweet.js — pull request #64 by andreaslundahl (2013-04-02 21:57:54+00:00)
Title: Add missing "var"

Add a missing "var" declaration to the Underscore.js reference. Without it, "_" is added to the global object, causing unexpected errors.

Reproduce the problem, at the REPL:

var s = require("./lib/sweet"); process.nextTick(function () { s.compile("var foo = 1;"); });

This will throw the exception "TypeError: Cannot call method 'isArray' of undefined", since the globally available "_" at some point becomes undefined.