coffeedoc / codo

CoffeeScript API documentation generator. It's like YARD but for CoffeeScript!
Other
624 stars 92 forks source link

More instructive parse error messages #207

Closed crogre closed 8 years ago

crogre commented 9 years ago

I just got a

Error: Cannot parse Coffee file file.coffee: unexpected indentation

message, and I have no idea what causes it. At least a line number would be extremely helpful :-)

inossidabile commented 8 years ago

Use coffee to parse it. I can't imagine a workflow in which you generate docs for a file that has never been executed

sschick-prognos commented 8 years ago

I am experiencing this same issue on a file that I have run, repeatedly. I don't get parse errors when I run the code through coffeescript, but codo doesn't seem to handle it well. it seems to me that codo should give a little more information about why it's giving up.

justmiles commented 8 years ago

I ran into this as well. Coffee was parsing the file but codo was failing. Turns out the indentation error was for a comment. Coffee won't throw an error because it ignores all comments - but indentation matters for codo.

Nonetheless, I agree. At least provide a line number for where codo failed to parse a comment block.

inossidabile commented 7 years ago

Any particular files to test with? If you can run it and Codo can't there shouldn't be such exception at all.