You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to match any body block that has two calls to the same (explicitly named) function, e.g. it should match this block:
it('should match this sub-block',()=>{// do Javascript thingsthisFunctionShouldOnlyBeCalledOnce(123);// do JavaScript thingsthisFunctionShouldOnlyBeCalledOnce(456);// do JavaScript things});
And it should not match this block:
it('should match this sub-block',()=>{// do Javascript thingsthisFunctionShouldOnlyBeCalledOnce(123);// do JavaScript things});
I tried a bunch of things, the "closest" I got were:
I'm trying to match any body block that has two calls to the same (explicitly named) function, e.g. it should match this block:
And it should not match this block:
I tried a bunch of things, the "closest" I got were:
grasp --squery 'call[callee=#it].arguments:nth(1).body! call[callee=#funcName] ~ call[callee=#funcName]'
grasp --equery 'funcName(__); _$; funcName(__);
But to no avail. Is this something that can be done with grasp?
The text was updated successfully, but these errors were encountered: