translate alias of named symbols #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "alias-of-named-symbols"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
support tree-sitter grammars like
tested on tree-sitter-make (result)
not sure if the tokens-logic is needed (
this.tokenNewNamesetc)handle name collisions = when
("_" + expr.content.name)existsI do not understand what this does. Can you give an example of what kind of output you are producing for a renamed rule?
the inner symbol is hidden by adding a underscore-prefix "_" to the tree-sitter symbol name
i added a test case in my fork: test-alias-of-named-symbol
tree-sitter grammar
tree-sitter test
lezer grammar
lezer test
yes, see test: Word is a token
I see, it renames the original token in order to be able to wrap it. I can see this introducing new issues (of ambiguous tokens), and my approach so far was that this kind of renaming or wrapping is something the user will have to address manually.
Again, I don't want to spend much time maintaining this, so I don't want to complicate it with further features or spend time reviewing patches. If you want to move this tool forward, I suggest you work on a fork instead. I'm going to decline this patch.
Pull request closed