You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Chapel code is documented with chpldoc, if the --comment-style flag is used, no verification is performed to ensure that the signifier of the end of the comment matches the start of the comment. We would like to ensure that all custom comment styles are closed in the reverse order of the starting sequence. We might also consider adding a flag to specify different opening and closing signifiers, but that would be a bonus feature.
Steps to Reproduce
Source Code:
/** This comment is not closed properly */proc bad() {
}
The handling of chpldoc flags can be found in compiler/main/docsDriver.cpp. Looking in there should allow you to determine the global variable used for determining if a block comment is a chpldoc comment (I recommend doing a search on the flag minus the leading "--" and then reading the description above the data structure which that will lead you to, in order to determine which of the components of that record is used).
The detection of whether an ordinary block comment or a chpldoc comment is being used is handled at parse time. Doing a search in the compiler for the variable you found in the last step will lead you to two potential files - one of them is generated from the other. The file you want to modify is compiler/parser/chapel.lex. Once you have made modifications there, you will need to do a make parser in the directory containing that source in order to actually see your changes take effect when you rebuild the compiler (a separate step).
Summary of Problem
When Chapel code is documented with chpldoc, if the --comment-style flag is used, no verification is performed to ensure that the signifier of the end of the comment matches the start of the comment. We would like to ensure that all custom comment styles are closed in the reverse order of the starting sequence. We might also consider adding a flag to specify different opening and closing signifiers, but that would be a bonus feature.
Steps to Reproduce
Source Code:
Compile command:
chpldoc --comment-style /** badClose.doc.chpl
Associated Future Test(s):
chpldoc/compflags/comment/badClose.doc.chpl
Configuration Information
chpl --version
:Chapel 1.10.0 and on (still present as of Chapel 1.15.0)
The text was updated successfully, but these errors were encountered: