sucralose
sucralose
Looks like building .so language files from source is deprecated in [py-tree-sitter](https://github.com/tree-sitter/py-tree-sitter), but there are no official python bindings for the [javascript grammar](https://github.com/tree-sitter/tree-sitter-javascript). Welp, that's annoying... The third-party Go bindings...
 Yeah, go-tree-sitter seems to work. Counting lines should be possible by looking at ``sourceCode``.
From the testing I've done to this point, I think would prefer go-tree-sitter to Babel, so I'll continue developing the formatting here. It'd still be useful to have your extract-js-strings.js...
> I wonder if its possible to get all the diff positions and then render it using the original names That sounds like it could indeed save time on skipping...
> afaik minifiers should produce the exact same structure for unmodified regions of the source Oh, that's more convenient, then. Does the formatter (biome/prettier) have the same property?
> Curious, aside from not liking node/etc, what aspects of go-tree-sitter do you find preferable/more useful than Babel? Or is it just that it's not node? I didn't investigate Babel...
> @michaelskyba As far as I am aware, babel-traverse implements an AST visitor pattern, which does a DFS through the AST tree. So I believe you basically just re-invented the...
This isn't specifically related, but I described it poorly initially, so to clarify, I think identifiers could be useful indicators too, and not just strings, so I'm trying to extract...
> @michaelskyba Identifiers churning between builds are sort of specifically the thing that creates the noise we're trying to eliminate though..? I haven't looked at the diffs that much but...
I rewrote it (no line tracking yet) to use the following query pattern: ``` (string) @string (template_string) @template (identifier) @identifier (property_identifier) @property (shorthand_property_identifier) @shorthand (comment) @comment ``` Here is the...