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
Hi, I'm writing a parser which gets all of the comments + the corresponding ast nodes for those comments I've implemented Fold as seen below. I'm trying to get the span of an ast node, but I can't figure out how to.
I can get the span from a node, but the span only gives me access to span.lo() and span.hi() (I read somewhere that those are the positions of adjacent comments).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm writing a parser which gets all of the comments + the corresponding ast nodes for those comments I've implemented
Fold
as seen below. I'm trying to get the span of an ast node, but I can't figure out how to.I can get the span from a node, but the span only gives me access to
span.lo()
andspan.hi()
(I read somewhere that those are the positions of adjacent comments).Is there any way I could get the start + end positions of an ast node?
I read #1969, but I'm confused as to which byte pos I'm supposed to pass in.
Beta Was this translation helpful? Give feedback.
All reactions