How do different text editors represent the file being edited? CodeMirror has interesting tree structure of lines: https://marijnhaverbeke.nl/blog/codemirror-line-tree.html