Iterator methods crash the document generation #73

Closed
ralf-o opened this Issue Sep 7, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@ralf-o

ralf-o commented Sep 7, 2015

esdoc version: 0.2.5

Classes with iterator methods (=> Symbol.iterator/@@iterator) crash the documentation generation process:

class MyIterable {
Symbol.iterator { ... }
}

will cause the following error:

TypeError: Cannot call method 'charAt' of undefined
at Object. (./node_modules/esdoc/out/src/Publisher/Builder/DocResolver.js:121:40)
at ./node_modules/esdoc/node_modules/taffydb/taffy.js:743:17
at each (./node_modules/esdoc/node_modules/taffydb/taffy.js:126:17)
at Object.API.extend.that (./node_modules/esdoc/node_modules/taffydb/taffy.js:740:7)
at Object.API.(anonymous function) as update
at DocResolver._resolveAccess (./node_modules/esdoc/out/src/Publisher/Builder/DocResolver.js:119:20)
at DocResolver.resolve (./node_modules/esdoc/out/src/Publisher/Builder/DocResolver.js:51:12)
at CoverageBuilder.DocBuilder (./node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:57:42)
at new CoverageBuilder (./node_modules/esdoc/out/src/Publisher/Builder/CoverageBuilder.js:33:81)
at publish (./node_modules/esdoc/out/src/Publisher/publish.js:156:35)

Using "@ignore" as a workaround does not work.
Using flag "autoPrivate=false" works, but in the API documentation the '@@iterator' method is called 'undefined'.

@h13i32maru

This comment has been minimized.

Show comment
Hide comment
@h13i32maru

h13i32maru Sep 10, 2015

Member

@ralf-o Hi! Thanks for this issue!
Sorry, this is ESDoc bug 😓 I try to fix it and please wait a little.

Member

h13i32maru commented Sep 10, 2015

@ralf-o Hi! Thanks for this issue!
Sorry, this is ESDoc bug 😓 I try to fix it and please wait a little.

utatti added a commit to utatti/esdoc that referenced this issue Sep 10, 2015

utatti added a commit to utatti/esdoc that referenced this issue Sep 12, 2015

fix: crash when [Symbol.iterator] is declared in a class.
esdoc#73

Use Escodegen to parse method names using ES6's computed property names.

h13i32maru added a commit that referenced this issue Sep 12, 2015

@h13i32maru

This comment has been minimized.

Show comment
Hide comment
@h13i32maru

h13i32maru Sep 13, 2015

Member

I published v0.2.6 that fixed this issue. Please try to use it.

Member

h13i32maru commented Sep 13, 2015

I published v0.2.6 that fixed this issue. Please try to use it.

@h13i32maru h13i32maru closed this Sep 13, 2015

@ralf-o

This comment has been minimized.

Show comment
Hide comment
@ralf-o

ralf-o Sep 13, 2015

I've tested the new version -> works great .... thanks a lot :-)

ralf-o commented Sep 13, 2015

I've tested the new version -> works great .... thanks a lot :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment