grasp icon indicating copy to clipboard operation
grasp copied to clipboard

if,else equery fails on if without else

Open ainthek opened this issue 8 years ago • 0 comments

fails with: Cannot read property 'type' of null any suggestions ? how to find if, else with single boolean returns ?

echo 'function _test(x){ if(x){ return true; } }

function _0059_useless_if(x){ if(x){ return true; } else{ return false; } }' | grasp -e 'if(__){ return _bool }else{ return _bool }'

also s-query would be fine. Is this bug or my misconcept ? I also tried -e "_ifelse{ return _bool }else{ return _bool }" but that does not work at all,

based on your sentence: After a wildcard __, node type or literal type, you can append an attribute selector as well: __[right] matches any node that has a right attribute.

not working.

ainthek avatar Feb 02 '16 18:02 ainthek