1. 19
  1.  

  2. 5

    Weggli is built on top of the tree-sitter parsing library and its C and C++ grammars.

    That’s surprising to read. Given that things like clang-format and libclang exist, I would expect clang internals to be usable for this use-case, and to give better results than tree-sitter.

    1. 1

      weggli does not require the ability to build the software and can work with incomplete sources or missing dependencies.

      Perhaps it is the latter of those two features that tree-sitter enables?

      1. 1

        clang-format doesn’t require ability to build.

      2. 1

        Maybe it’s more that they wanted to write Weggli in Rust, and so libclang and friends were harder to reach for?

      3. 1

        It calls itself a semantic search tool, yeat as far as I can see, it only does syntax analysis. Am I missing something, or is the tool straight up misleading?

        1. 1

          Yeah, I agree that this at minimum requires clarification. On the other hand, you can go surprisingly far using similar approaches: https://web.stanford.edu/~mlfbrown/paper.pdf.