www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - ddoc template error

reply "BlackEdder" <edder tkwsping.nl> writes:
I'm trying to use ddoc to generate documentation, but get the 
following error:
$ dub -b docs
Building configuration "library", build type docs
Running dmd...
source/painlessjson.d(287): Error: template 
painlessjson.fromJSON(T)(JSONValue json) unmatched --- in DDoc 
comment
FAIL . painlessjson staticLibrary
Error executing command run: dmd failed with exit code 1.

The relevant code:
/// Convert from JSONValue to any other type
T fromJSON(T)(JSONValue json)
{
  /* code */
}

The code on its own compiles normally (and passes all tests).

Link to full code:
https://github.com/BlackEdder/painlessjson/blob/master/source/painlessjson.d#L286

Any help appreciated :)
Jan 19 2015
parent reply "BlackEdder" <edder tkwsping.nl> writes:
Solved it. I had a _fromJSON comment somewhere else in the file 
and the underscore causes ddoc to fail

On Monday, 19 January 2015 at 20:47:42 UTC, BlackEdder wrote:
 I'm trying to use ddoc to generate documentation, but get the 
 following error:
 $ dub -b docs
 Building configuration "library", build type docs
 Running dmd...
 source/painlessjson.d(287): Error: template 
 painlessjson.fromJSON(T)(JSONValue json) unmatched --- in DDoc 
 comment
 FAIL . painlessjson staticLibrary
 Error executing command run: dmd failed with exit code 1.

 The relevant code:
 /// Convert from JSONValue to any other type
 T fromJSON(T)(JSONValue json)
 {
  /* code */
 }

 The code on its own compiles normally (and passes all tests).

 Link to full code:
 https://github.com/BlackEdder/painlessjson/blob/master/source/painlessjson.d#L286

 Any help appreciated :)
Jan 20 2015
parent reply "Mathias LANG" <geod24 gmail.com> writes:
On Tuesday, 20 January 2015 at 08:55:58 UTC, BlackEdder wrote:
 Solved it. I had a _fromJSON comment somewhere else in the file 
 and the underscore causes ddoc to fail
If you could reduce it to a manageable size and post it to https://issues.dlang.org/ that'll be super cool :)
Jan 20 2015
parent "BlackEdder" <edder tkwsping.nl> writes:
On Tuesday, 20 January 2015 at 09:38:55 UTC, Mathias LANG wrote:
 On Tuesday, 20 January 2015 at 08:55:58 UTC, BlackEdder wrote:
 Solved it. I had a _fromJSON comment somewhere else in the 
 file and the underscore causes ddoc to fail
If you could reduce it to a manageable size and post it to https://issues.dlang.org/ that'll be super cool :)
Done: https://issues.dlang.org/show_bug.cgi?id=14015
Jan 20 2015