tunnckoCore/parse-function

comments in parameters

ORESoftware opened this issue · 2 comments

Just wondering if this library has any problems when parsing comments in args like so:

 this.it('does throw part 1', function (/*done*/) {

thanks

Hmm.. i don't think so, try.

You can PR test, thanks! :)


edit: btw @ORESoftware what you expect? because I think it would be stripped.

var actual = parseFunction('function (/* done */) {return true}')
console.log(actual)
// => { name: 'anonymous', args: [], params: '', body: 'return true' }

I think that's the correct result. And can't be in other way, we stay on top of acorn.