4 ms·
Point taken about the developer documentation. But the query language is only user-facing if the tool you're using exposes it. And the CLI only if you need to b
by alwaysbeconsing 3y ago
Point taken about the developer documentation. But the query language is only user-facing if the tool you're using exposes it. And the CLI only if you need to build your own grammars; I expect that to be less and less common as time goes on.
- nerdponx 3y agoMaybe this is a "blind spot" of sorts to the developers of Tree Sitter, but I find that the CLI is directly useful for end users to perform queries on their code. Maybe it would be better if we had dedicated tools that were more oriented at end users rather than developers of TS grammars, but it seems silly not to use a perfectly good tool that already exists. Somewhat of an aside about building grammars, I have found that the grammars are relatively hard to make small modifications or extensions to. Whereas it's relatively easy with e.g. traditional Vim syntax highlighting. Making grammars easier to extend would be valuable for users of languages like SQL that have a zillion custom dialects.
- alwaysbeconsing 3y ago> I find that the CLI is directly useful for end users to perform queries on their code That's interesting; what do they use the results for? > I have found that the grammars are relatively hard to make small modifications or extensions to Definitely true. I think this may be an inherent problem of the system and the parser generation, though. I am not sure it's solvable by the grammar authors.
- nerdponx 3y agoI use it for code search. I can search for the definition of a given function, or all places that a particular function is called by name.