1. Visit empty buffer test in fundamental mode (C-x b test RET) 2. Insert tee << EOF text1 $var text2 $(echo cmd) text3 $var2 EOF 3. Put point before "text2" 4. M-x load-library RET treesit RET 5. M-: (treesit-node-children (treesit-node-at (point) 'bash)) => (# #) Note that this list is incorrect, "$var2" at the end of heredoc is missing. 6. M-: (treesit-node-first-child-for-pos (treesit-node-at (point) 'bash) (point)) => nil Expected return value here is # I'm not sure if this bug is on Emacs, tree-sitter-bash or even tree-sitter itself and I don't know how to check. tree-sitter-bash version: 0.19.0.r19.g77cf8a7-1 tree-sitter version: 0.20.7-1 Thanks and best regards.