scala-exercises icon indicating copy to clipboard operation
scala-exercises copied to clipboard

Scaladoc blocks not attached to an actual function won't be shown in exercises

Open jdesiloniz opened this issue 7 years ago • 2 comments

There seems to be a current limitation when parsing the ScalaDoc of an exercise, so that only comment blocks above a given exercise function actually appear in the parsed exercise. In practice this means that there's no way to offer a conclusion paragraph or bibliographic references if needed.

This issue could be also related to #338.

jdesiloniz avatar Jul 12 '16 16:07 jdesiloniz

This will require either a "hack" or a fairly moderate change to the exercise compiler.

At the moment, we piggyback on Scaladoc's classes. The scaladoc parser only handles doc comments that are attached to objects/classes/methods or other top level constructs. As long as we are using the Scaladoc compiler (and parser), we are stuck with this limitation (unless we do a "hack" or some kind).

One good option, which I would like to explore, is to see if the scala-meta parser enables you to gather all of the doc comments.

andyscott avatar Jul 12 '16 20:07 andyscott

@jdesiloniz Are you meaning to something like: https://github.com/scala-exercises/scala-exercises/issues/209?

rafaparadela avatar Feb 01 '17 08:02 rafaparadela