def to_spans(self):
        s = set()
        self._convert_to_spans(self.tree, 1, s)
        return s
Convert the tree to a set of nonterms and spans.
dataset/ETHPy150Open emilmont/pyStatParser/stat_parser/eval_parser.py/TreeOperations.to_spans