Get range of current scope

Is there a way to get the text range of the currently selected scope/selector?