Closed hegemonic closed 11 years ago
A couple more changes for lenient mode, which is now extremely lenient indeed:
This change caused the tests to take about twice as long as before. I don't have good benchmarking data, so I'm not sure whether this is an across-the-board speed hit or whether it affects certain types more than others.
Based on when I first noticed the slowdown, I'm pretty sure that the culprit is type unions without parentheses.
Before I can integrate Catharsis into JSDoc, the parser needs to support a lenient mode that's a little more forgiving than Closure Compiler.
When in lenient mode, the parser should support the following patterns, which have worked in JSDoc 3 for a while:
function
without trailing parens.Array<string>
).string|boolean
).#
and~
, which JSDoc uses to indicate scope. (I think this should only be allowed in lenient mode, although I'm not certain...)Also, we should maintain separate type caches for lenient-mode and strict-mode parsing.