示例#1
0
            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);
            }
示例#2
0
 public NoMatch(Subslice stage, Logic logic)
 {
     _stage = stage;
     _logic = logic;
 }
示例#3
0
 public PartialMatch(Subslice stage, Logic logic)
 {
     _stage = stage;
     _logic = logic;
 }
示例#4
0
 public PassThrough(Subslice stage, Logic logic)
 {
     _stage = stage;
     _logic = logic;
 }