27 lines
843 B
C#
27 lines
843 B
C#
using OneOf;
|
|
|
|
namespace InkBlot.ParseHierarchy;
|
|
|
|
[GenerateOneOf]
|
|
public partial class
|
|
MultiDivert : OneOfBase<ThreadDivert, DivertsListWithReturnFromTunnel, DivertsListWithoutReturnFromTunnel>,
|
|
IStoryNode
|
|
{
|
|
}
|
|
|
|
public record Identifier(string[] Elements /* TODO: expressions */);
|
|
|
|
// <- thread_name
|
|
public record ThreadDivert(Identifier Identifier) : IStoryNode;
|
|
|
|
// -> ... ->-> // return from tunnel
|
|
// or
|
|
// -> ... ->-> tunnelReplacement // return from tunnel, but replace destination
|
|
public record DivertsListWithReturnFromTunnel(Identifier[] Identifiers, Identifier? TunnelReplacement)
|
|
: IStoryNode;
|
|
|
|
// -> ... -> div // not a tunnel
|
|
// or
|
|
// -> ... -> div -> // is tunnel
|
|
public record DivertsListWithoutReturnFromTunnel(Identifier[] Identifiers, bool IsTunnel)
|
|
: IStoryNode; |