They do, but their interface to the computer does not. Screen readers are inherently linear while a screen show two dimensions at once. Indentation is the primary way this happens in practice.
(I suppose it would not be impossible for a programming language to have 3d layout projected onto the 2d screen, but I'm not aware of any mainstream languages that do this. Significant whitespace is fairly common of course and nonsignificant indentation is more common still)
Good point. I imagine something like vim's "folding" feature could be used to interactively navigate source code with a screen reader by successively opening the folds of interest.
(I suppose it would not be impossible for a programming language to have 3d layout projected onto the 2d screen, but I'm not aware of any mainstream languages that do this. Significant whitespace is fairly common of course and nonsignificant indentation is more common still)