Closed
Description
Over at https://dart-review.googlesource.com/c/sdk/+/413520/comment/107d6345_854a2009/, @bwilkerson suggested:
We should maybe consider adding
NodeList.offset
,NodeList.length
, andNodeList.end
You can usecombinators.beginToken?.offset
andcombinators.endToken?.end
to get this information.
At that CL, I made an extension for those values. Two things to have in mind here:
- The list can be empty so
offset
andend
should be nullable - There is already a
length
getter which means how many items we have inside the list. We should probably think of a better name for thislength
or not implement it since it can be easily calculated with the other two values. At the CL extension, I've named itnodesLength
.