Getting line numbers from Span
#2734
liangchunn
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm writing a program uses
oxc_ast::Visit::enter_node
to visit the AST, and filters out nodes that I want and gets its respectiveSpan
s. How do I correlate theSpan
s back to the source code's line number?I've tried using
oxc_codegen
, but the returningSourceMap
doesn't have any functions that acceptSpan.start
and/orSpan.end
s.Minimal example:
The program outputs:
Beta Was this translation helpful? Give feedback.
All reactions