Attached is updated patch which should be compatible with both tree-sitter grammar versions.

Let me know if there are other things you think should be ammended.