trailing comments
When using djinni, it fails on trailing comments. Using comments not for documentation, but for commenting out methods / fields doesn't really work.
Works (because it still looks like a documentation comment)
blah = interface +c {
# method_a();
method_b();
}
Doesn't work but I would guess every single developer would expect it to
blah = interface +c {
method_a();
# method_b();
}
Maybe there should be a special token to indicate documentation comments. Something like starting a comment block with double ## in the spirit of javadoc/doxygen to distinguish them from passive comments.
We're looking at this same sort of use case internally, and I agree there needs to be a distinction between doc comments and code comments. Our current thought is to avoid compatibility-breakages by adding a second comment syntax using // (C++ style) for code comments, leaving # reserved for doc comments. Thoughts?
I need to generate comments so that they can be parsed by another tool. To maintain backwards compatibility I vote on using // for code comments. I can even try to create a PR with this if you agree with this change.
I'm in favor of that option, as I said above, so I'd say go for it.
I created the PR https://github.com/dropbox/djinni/pull/379 which implements code comments support.