gkz / grasp

JavaScript structural search, replace, and refactor
http://graspjs.com
MIT License
1.28k stars 33 forks source link

query not working with `await` in code #131

Open adros opened 5 years ago

adros commented 5 years ago

When my code contains await keyword, the query does not match anything behind it. Simple example:

async function foo() {
    baz();
}
async function bar() {
    await baz();
}

When I execute query grasp -s 'CallExpression' over it, I get only one match (on 2nd line), but two are expected. The AST tree (produced byt --print-ast) seems to be OK.