bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59426: 29.0.50; [tree-sitter] Some functions exceed maximum recursio


From: Eli Zaretskii
Subject: bug#59426: 29.0.50; [tree-sitter] Some functions exceed maximum recursion limit
Date: Thu, 24 Nov 2022 21:28:16 +0200

> From: Yuan Fu <casouri@gmail.com>
> Date: Thu, 24 Nov 2022 11:25:58 -0800
> Cc: Eli Zaretskii <eliz@gnu.org>,
>  Po Lu <luangruo@yahoo.com>,
>  Stefan Kangas <stefankangas@gmail.com>,
>  59426@debbugs.gnu.org
> 
> That brings us back to the original question: what limit should we use? I 
> suggest we use a smaller number since normal tree should never be very tall. 
> Running the following code tells me the height of the tree for xdisp.c is 30:
> 
> (defun measure-height (node)
>   (let ((children (treesit-node-children node t)))
>     (if children
>         (1+ (apply #'max (mapcar #'measure-height children)))
>       1)))
> ;; In xdisp.c:
> (measure-height (treesit-buffer-root-node))
> 
> Maybe a limit in the range of hundreds or thousands? 800?

I suggest 1000.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]