public virtual Differences VisitQueryPosition(QueryPosition position1, QueryPosition position2){ Differences differences = new Differences(position1, position2); if (position1 == null || position2 == null){ if (position1 != position2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++; return differences; } QueryPosition changes = (QueryPosition)position2.Clone(); QueryPosition deletions = (QueryPosition)position2.Clone(); QueryPosition insertions = (QueryPosition)position2.Clone(); //position1.Context; if (differences.NumberOfDifferences == 0){ differences.Changes = null; differences.Deletions = null; differences.Insertions = null; }else{ differences.Changes = changes; differences.Deletions = deletions; differences.Insertions = insertions; } return differences; }
public virtual Node VisitQueryPosition(QueryPosition position, QueryPosition changes, QueryPosition deletions, QueryPosition insertions){ this.UpdateSourceContext(position, changes); if (position == null) return changes; if (changes != null){ if (deletions == null || insertions == null) Debug.Assert(false); else{ } }else if (deletions != null) return null; return position; }
public override Node VisitQueryPosition(QueryPosition position){ this.hasContextReference = true; return position; }
public virtual Node VisitQueryPosition(QueryPosition position){ return position; }
public override Node VisitQueryPosition(QueryPosition position){ if (position == null) return null; return base.VisitQueryPosition((QueryPosition)position.Clone()); }
public virtual void VisitQueryPosition(QueryPosition position){ }
public virtual Node VisitQueryPosition(QueryPosition position1, QueryPosition position2){ return position1; }
public override Node VisitQueryPosition(QueryPosition qp) { if (qp.Context != null) { if (qp.Context.Position == null && qp.Context.PreFilter != null && qp.Context.PostFilter != null) { qp.Context.Position = this.NewClosureLocal(SystemTypes.Int32, this.currentMethod.Body.Scope); qp.Context.PreFilter.Statements.Add(new AssignmentStatement(qp.Context.Position, Literal.Int32Zero)); BinaryExpression badd = new BinaryExpression(qp.Context.Position, Literal.Int32One, NodeType.Add); badd.Type = SystemTypes.Int32; qp.Context.PostFilter.Statements.Add(new AssignmentStatement(qp.Context.Position, badd)); } return this.VisitExpression(qp.Context.Position); } return Literal.Int32Zero; }
public override Node VisitQueryPosition(QueryPosition position) { this.hasContextReference = true; return this.Compose(position, this.GetComposer(position)); }
public override Node VisitQueryPosition(QueryPosition position) { this.hasContextReference = true; return(this.Compose(position, this.GetComposer(position))); }
public EventingVisitor(Action<QueryPosition> visitQueryPosition) { VisitedQueryPosition += visitQueryPosition; } public event Action<QueryPosition> VisitedQueryPosition; public override Node VisitQueryPosition(QueryPosition position) { if (VisitedQueryPosition != null) VisitedQueryPosition(position); return base.VisitQueryPosition(position); }