Replies: 1 comment 8 replies
-
|
Maybe something like let (ast, source_text) = parser.parse_module_with_source(&Scope::global(), &mut interner).unwrap();
let span = process_ast(&interner, ast);
let s = source_text.get_code_points_from_span(span); |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have some code that parses a JS file and then processes the AST. As part of this I have a
boa_ast::Spanthat I would like to resolve to the corresponding source-code text (as UTF-16).How would I do that?
The code looks something like:
Beta Was this translation helpful? Give feedback.
All reactions