public IList<HandlerInfo> FindActiveHandlersFor(IokeObject condition, BindIndex stopIndex) { var result = new SaneList<HandlerInfo>(); foreach(IList<HandlerInfo> lrp in Handlers) { foreach(HandlerInfo rp in lrp) { if(rp.index.LessThan(stopIndex)) { return result; } foreach(object possibleKind in rp.applicableConditions) { if(IokeObject.IsMimic(condition, IokeObject.As(possibleKind, condition))) { result.Add(rp); } } } } return result; }
public RestartInfo(string name, IokeObject restart, object token, BindIndex index, object data) { this.name = name; this.restart = restart; this.token = token; this.index = index; this.data = data; }
public RescueInfo(IokeObject rescue, IList applicableConditions, object token, BindIndex index) { this.rescue = rescue; this.applicableConditions = applicableConditions; this.token = token; this.index = index; }
public HandlerInfo(IokeObject handler, IList applicableConditions, object token, BindIndex index) { this.handler = handler; this.applicableConditions = applicableConditions; this.token = token; this.index = index; }
public bool LessThan(BindIndex other) { return this.row < other.row || (this.row == other.row && this.col < other.col); }
public bool GreaterThan(BindIndex other) { return this.row > other.row || (this.row == other.row && this.col > other.col); }