protected override MatchResult MatchSame(PassiveExpression expression, ref int exIndex) { if (expression == null || exIndex >= expression.Count) { return(MatchResult.Failure); } // match same symbol if (this.Symbol != null) { // match the bound value if (Symbol.Equals(expression[exIndex++])) { return(MatchResult.Success); } } // match same subexpression else if (this.Expression != null) { if (expression.CompareToExpression(exIndex, this.Expression)) { exIndex += this.Expression.Count; return(MatchResult.Success); } } return(MatchResult.Failure); }
protected override MatchResult MatchSame(PassiveExpression expression, ref int exIndex) { if (expression != null && expression.CompareToExpression(exIndex, this.Expression)) { exIndex += this.Expression.Count; return(MatchResult.Success); } return(MatchResult.Failure); }
protected override MatchResult MatchSame(PassiveExpression expression, ref int exIndex) { if (expression != null && expression.CompareToExpression(exIndex, this.Expression)) { exIndex += this.Expression.Count; return MatchResult.Success; } return MatchResult.Failure; }
protected override MatchResult MatchSame(PassiveExpression expression, ref int exIndex) { if (expression == null || exIndex >= expression.Count) return MatchResult.Failure; // match same symbol if (this.Symbol != null) { // match the bound value if (Symbol.Equals(expression[exIndex++])) return MatchResult.Success; } // match same subexpression else if (this.Expression != null) { if (expression.CompareToExpression(exIndex, this.Expression)) { exIndex += this.Expression.Count; return MatchResult.Success; } } return MatchResult.Failure; }