Bug #3711
improve/fix comments conversion problems
0%
Related issues
History
#1 Updated by Greg Shah almost 8 years ago
- Related to Feature #2110: improve orphan comment processing added
#2 Updated by Greg Shah almost 8 years ago
With 2110a, the number of orphaned comments is now a small fraction of the previous amount. For example, the large ChUI application had over 26000 orphaned comments before 2110a and after it had 289.
The remaining orphaned comments are probably related to cases where the conversion deletes nodes such that the shadow node's left id/right id reference nodes that no longer exist.
An example can be seen in testcases/uast/strings_comments_whitespace.p.
The code is similar to this:
my-char-var = 'The beginning ' + /* comment1 */
'of some ' + /* comment2 */
'text.'.
The conversion will rewrite the rvalue expression as a simple STRING with text "The beginning of some text.". Thus, the original STRING and PLUS nodes no longer exist and the comments are orphaned.
A solution to this would require fixups for the shadow nodes when referenced AST nodes are deleted. There may be other cases too.
#3 Updated by Greg Shah 5 months ago
- Subject changed from resolve remaining orphaned comments cases to improve/fix comments conversion problems
This task is about improving/fixing comments in general. There will generally be 2 causes:
- orphaned comments where we cannot calculate an attachment point for a given comment
- comments that are placed in the wrong location
Both sets of problems should be resolved here.
We should start by collecting testcases (both successful and failing). I will link related customer bug reports here. Those need to be "mined" for failing testcases.
#9 Updated by Greg Shah 5 months ago
- Related to Feature #2111: improve handling of comments that are related to each other ("sets" of comments) added