Can't get the esprima 4.0.1 parser to work with 'await'. Having difficult times to find the relevant options that can be passed into the parse function for 'await', if that is possible.
const esprima = require('esprima');
esprima.parse("await function_call()")
Describing the code structure containing the await call
Error: Line 1: Unexpected identifier
Your code is a SyntaxError. await
is only a keyword inside async function
s:
esprima.parse("(async function() {await function_call()})()")