gkz / grasp

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

array selectors not working. #42

Open eurekaa opened 10 years ago

eurekaa commented 10 years ago

Hi, if i have a code like:

var a = 0;
var b = 1;
var c = 2;

the squery 'dec' returns an array of 3 declarations, but the query 'dec:last' returns an empty array. The same for every selector (:first, :nth, ecc..).

Thanks.

gkz commented 9 years ago

What you want is :last-child But you are right, this is confusing and should be better explained