Fix the segmentation fault that occurs with the following code:
PY_LANGUAGE = Language(tspython.language(), "python") # type: ignore
parser = Parser()
parser.set_language(PY_LANGUAGE)
tree = parser.parse(b"i = 0")
node = tree.root_node
v = node.child(node.child_count)
print(v) # This line will cause a SIGSEGV
assert v is None
This commit corresponds to this code in the Rust binding
Fix the segmentation fault that occurs with the following code:
This commit corresponds to this code in the Rust binding