Replies: 1 comment 2 replies
-
Hey! local child_condition_node = condition_nodes[child_index] with local child_condition_node = vim.deepcopy(condition_nodes[child_index]) makes it work on my end :) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to write a snippet that generates ternary statements of any depth.
For example, a depth of 1:
A depth of 2:
The difficulty I am facing is not in generating the structure, but in using the repeat node. What I mean is, the user only has to change
condition_1
once and this should propagate to all othercondition_1
.I tried doing this, but I haven't been able to get it to work. The code below works for the case of a depth of 2, but not reports an error for anything larger.
Beta Was this translation helpful? Give feedback.
All reactions