DelphiAST icon indicating copy to clipboard operation
DelphiAST copied to clipboard

Get the end_line and end_col of a multi-line comment?

Open PeterPanino opened this issue 5 years ago • 3 comments

While the uses node: <USES begin_line="7" begin_col="1" end_line="14" end_col="1"> ... as a multiline element has the attributes begin_line, begin_col, end_line, end_col, the Comments-node object has only the members line and col. Although a comment can be multiple lines.

So how can I determine the end_line and end_col of a multi-line comment?

PeterPanino avatar Dec 12 '19 21:12 PeterPanino

But can't you calculate this from comment text?

RomanYankovsky avatar Dec 14 '19 22:12 RomanYankovsky

Yes, but this would be a kind of guessing. Having an EXPLICIT syntax tree information about the end_line and end_col of a multi-line comment would be better.

PeterPanino avatar Dec 15 '19 07:12 PeterPanino

@RomanYankovsky I think that this yet another to decide which way to go: close (out of scope) or triage it as a new feature: great idea is to assign labels: enhancement and help wanted to highlight your decision

bogdanpolak avatar Jun 08 '22 12:06 bogdanpolak