public Logic(Subslice stage, IImmutableList <string> path) : base(stage.Shape) { _stage = stage; _passThrough = new Lazy <PassThrough>(() => new PassThrough(stage, this)); _partialMatch = new Lazy <PartialMatch>(() => new PartialMatch(stage, this)); _noMatch = new Lazy <NoMatch>(() => new NoMatch(stage, this)); _expected = path != null ? new Stack <string>(path.Reverse()) : new Stack <string>(); SetState(_expected.Count == 0 ? MatchState.Passthrough : MatchState.PartialMatch); SetHandler(stage.Out, this); }
public NoMatch(Subslice stage, Logic logic) { _stage = stage; _logic = logic; }
public PartialMatch(Subslice stage, Logic logic) { _stage = stage; _logic = logic; }
public PassThrough(Subslice stage, Logic logic) { _stage = stage; _logic = logic; }