maxtaco/tamejs — pull request #34 by sktaylor (2012-08-03 04:55:42+00:00)
Title: Fixed: blank file as input produces invalid javascript file

Running tamejs on an empty file, produced an invalid javascript file. Notice the call to "undefined" as a function on the last line. Now it calls an anonymous function.

Output Was:

var tame = require('tamejs').runtime;
var __tame_defer_cb = null;
undefined (tame.end);

Output Is:

var tame = require('tamejs').runtime;
var __tame_defer_cb = null;
(function(){})(tame.end);