gkz / grasp

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

Selector body can't be more than one statement #68

Closed ainthek closed 9 years ago

ainthek commented 9 years ago

grasp -e 'put($);put($)' -r samples

I;m trying to find two calls to put method one following the other but I gent error Selector body can't be more than one statement. Any hints please ?

gkz commented 9 years ago

grasp 'exp-statement[exp=call[callee=#put]]+exp-statement[exp=call[callee=#put]]' will match the second put if there are two in a row.