csnover / js-doc-parse

An experimental library for parsing JavaScript files and extracting inline documentation.
31 stars 7 forks source link

Issue with DTK Commit 29111 #57

Closed kitsonk closed 12 years ago

kitsonk commented 12 years ago

It looks like a commit to fix the comments has broken the parser. This changeset 29111 seems to be causing the following when running the parser:

Processing module dojo/_base/kernel (6.03M used / 17.41M RSS)
ERR: dojo/_base/kernel.js:1:52 TypeError: Cannot read property '1' of null
    at processComment (/Users/kitsonk/github/js-doc-parse/lib/processor/dojodoc.js:244:31)
    at Object.generateMetadata (/Users/kitsonk/github/js-doc-parse/lib/processor/dojodoc.js:383:17)
    at /Users/kitsonk/github/js-doc-parse/lib/esprimaParser.js:63:14
    at Array.forEach (native)
    at attachMetadata (/Users/kitsonk/github/js-doc-parse/lib/esprimaParser.js:46:18)
    at createFunctionValue (/Users/kitsonk/github/js-doc-parse/lib/esprimaParser.js:81:3)
    at Object.FunctionExpression (/Users/kitsonk/github/js-doc-parse/lib/esprimaParser.js:502:16)
    at read (/Users/kitsonk/github/js-doc-parse/lib/esprimaParser.js:239:27)
    at Object.CallExpression (/Users/kitsonk/github/js-doc-parse/lib/esprimaParser.js:350:43)
    at read (/Users/kitsonk/github/js-doc-parse/lib/esprimaParser.js:239:27)
kitsonk commented 12 years ago

This appears to be related to an uprev of esprima. Not sure what is going on, but I had updated the esprima submodule and it caused this issue. I reverted back and it fixes it. So there is likely to be a regression when esprima gets updated.

csnover commented 12 years ago

Feel free to reopen this when esprima 1.0 is tagged/released if this is still an issue (should be soon). It is entirely possible that something in newer esprima is working differently that breaks this, but it’s also possible it was some regression introduced in between version releases.