RomanYankovsky / DelphiAST

Abstract syntax tree builder for Delphi
Mozilla Public License 2.0
272 stars 117 forks source link

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

Open PeterPanino opened 4 years ago

PeterPanino commented 4 years ago

While the uses node: <USES begin_line="7" begin_col="1" end_line="14" end_col="1"> ... as a multiline element has the attributes _beginline, _begincol, _endline, _endcol, 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?

RomanYankovsky commented 4 years ago

But can't you calculate this from comment text?

PeterPanino commented 4 years ago

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.

bogdanpolak commented 2 years ago

@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