Closed GTrunSec closed 2 years ago
Is there any reason we need tree-sitter? As far as I know, incremental parsing is useful for text editors, but in the case of this project, we need to parse entire abstract syntax trees of inputs (for package recipes and Package-Requires
library headers). We don't need the capability of incremental parsing.
Twist have used fromElisp from the beginning. It is a pure Nix library, which is important for avoiding IFD.
Actually, I have not been completely able to avoid IFD (see #20), but if we switched to tree-grepper, which is an external program, it wouldn't solve the issue. We had better stick with pure Nix wherever possible.
By the way, since you seem to be interested in this project, I must work on the user documentation. I appreciate your comment.
Thanks for clearing up my half-baked suggestion. I just briefly looked at the test data and guessed whether using the tree-sitter syntax to parse the usePackage solution is feasible or not.
Regarding: https://github.com/emacs-twist/twist.nix/tree/master/pkgs/build-support/elisp Suggestion: https://github.com/BrianHicks/tree-grepper, to be simple and easier.