Open
Description
this what I currently have in mind
#[derive(knus::Decode, Debug)]
enum Text {
#[knus(name="Raw")]
Raw(Raw),
#[knus(name="CallFunc")]
CallFunc(Call),
}
This is in part inspired by zellij style of APIs, where commands are using pascal case: https://zellij.dev/documentation/keybindings-possible-actions
Note that if my understanding is correct then my assumption that it will be possible to name two variants the same, and thus enabling patterns like this:
// note that "text" node should have either one argument or a nested node only
// thus enum might be a good data structure for that
text "raw text"
text {
call "funcName"
}
although, no promises that the last one will work, depends greatly on the code structure.
Metadata
Assignees
Labels
No labels
Activity