Open antoniomuso opened 1 year ago
I did some tests, and I found that if I add +1
to the span as follow:
let mut hi = span.hi();
hi.0 += 1;
// Get trailing comments
let comments_opt = self.comments.get_trailing(hi);
I get the comment.
Describe the bug
I cannot get comments like:
Using a Visitor like this:
the
extract_leading_comments_span
andextract_trailing_comments_span
use respectively these two methods:I note that the comment is contained in the Comments data structure but using these two methods I cannon get it.
Input code
Expected behavior
The Comment should be getting as a Trailing comment in KV span.
Actual behavior
The commit is not returned
Version
swc_core = 0.69.17
Additional context
I can get the comment only If the comment is as follows: