transpile optionalChaining expressions while parsing #16214
Replies: 2 comments 1 reply
-
No, the parser only produces the AST for the code as it is provided. You can traverse the AST generated by the parser to manually transpile optional chaining, or use |
Beta Was this translation helpful? Give feedback.
-
Thanks, this helped. I do have a follow-up though, right now we use babel-parser with a bunch of parser options, what are the equivalent options when using babel-core.transform()? The parser options we currently use are as follows: |
Beta Was this translation helpful? Give feedback.
-
input : var p = t?.[r].hostClass
is there any way that the parser would transpile optional chaining expressions and then produce ast ?
Beta Was this translation helpful? Give feedback.
All reactions