visionmedia/node-jscoverage — pull request #19 by andreyvit (2012-11-22 09:41:16+00:00)
Title: Fix: instrumentation breaks `new(require('foo'))(args)`

Fix a missing parenthesis when generating code for a new() statement applied to an expression, like the example:

new(require('foo'))(args)

which used to generate

new require('foo')(args)

resulting in the returned function being called without 'new'.

I have no idea why on earth TOK_LP calls instrument_function_call; it seems to treat all parethesized expressions as function calls, but I didn't feel like investigating that.