|
From: | Perry Smith |
Subject: | Re: More Tree Sitter Questions / Problems. |
Date: | Wed, 14 Dec 2022 17:22:44 -0600 |
You might be misunderstanding my concern (but I do appreciate all of your examples and thoughts). My concern is if Tree Sitter modes deviate too much from the old way, they may not catch on. Perhaps I should not worry about that. The old modes are not going anywhere so people can keep which ever they prefer. But, that is where my worry is coming from. On a slightly different topic but only slightly, I discovered that my first draft also does this: if 12 * 18 + 45 - 19 frog = 12 end Rather than this: if 12 * 18 + 45 - 19 frog = 12 end “frog” (in the first example) is indented to the bol of parent. The parent is “then” (not if) and the “then” is on the 2nd line, not the first. So instead of indenting two spaces from the bol of the “if", it is indented two spaces from the bol of the “then” which is the 45. All this to say that now that I”m getting deeper into this, I plan to rethink things. “Parent”, “grand parent”, “first-sibling”, etc are likely not going to be good for anchor points because simply adding paren’s makes a node on level deeper. I think what will be better in the case of the “if” will be to be anchor to closest “if”. I’m also coming to the conclusion that “parent-bol” would be better if it was (bol (parent)) so that (bol (grand-parent)) and (bol (ancestor “if”)), etc could be easily done. These are mostly “thinking out loud” type comments. I plan on piddling with things more. Perry |
signature.asc
Description: Message signed with OpenPGP
[Prev in Thread] | Current Thread | [Next in Thread] |