public virtual Node VisitQueryExists(QueryExists exists, QueryExists changes, QueryExists deletions, QueryExists insertions){ this.UpdateSourceContext(exists, changes); if (exists == null) return changes; if (changes != null){ if (deletions == null || insertions == null) Debug.Assert(false); else{ } }else if (deletions != null) return null; return exists; }
public virtual Node VisitQueryExists(QueryExists exists){ if (exists == null) return null; exists.Source = this.VisitExpression(exists.Source); return exists; }
public virtual Differences VisitQueryExists(QueryExists exists1, QueryExists exists2){ Differences differences = new Differences(exists1, exists2); if (exists1 == null || exists2 == null){ if (exists1 != exists2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++; return differences; } QueryExists changes = (QueryExists)exists2.Clone(); QueryExists deletions = (QueryExists)exists2.Clone(); QueryExists insertions = (QueryExists)exists2.Clone(); // exists1.Source; 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 override Node VisitQueryExists(QueryExists exists){ if (exists == null) return null; exists.Source = this.VisitExpression(exists.Source); if (exists.Source != null && exists.Source.Type != null){ exists.Type = SystemTypes.Boolean; } return exists; }
public override Node VisitQueryExists(QueryExists qe) { if (qe == null) return null; qe.Source = this.VisitExpression(qe.Source); if (qe.Source == null || qe.Source.Type == null) return null; Cardinality card = this.typeSystem.GetCardinality(qe.Source, this.TypeViewer); if (card != Cardinality.OneOrMore && card != Cardinality.ZeroOrMore) { this.HandleError(qe.Source, Error.QueryNotStream); return null; } if (qe.Type == null) return null; return qe; }
public override Node VisitQueryExists(QueryExists exists){ if (exists == null) return null; return base.VisitQueryExists((QueryExists)exists.Clone()); }
public virtual void VisitQueryExists(QueryExists exists){ if (exists == null) return; this.VisitExpression(exists.Source); }
public virtual Node VisitQueryExists(QueryExists exists1, QueryExists exists2){ if (exists1 == null) return null; if (exists2 == null) exists1.Source = this.VisitExpression(exists1.Source, null); else exists1.Source = this.VisitExpression(exists1.Source, exists2.Source); return exists1; }
public override Node VisitQueryExists(QueryExists qe) { // true if the source is not empty Block block = new Block(new StatementList(4)); Block exit = new Block(); TypeNode targetType = this.typeSystem.GetStreamElementType(qe.Source, this.TypeViewer); Expression locval = new Local(SystemTypes.Boolean); Expression locTarget = new Local(targetType); Block inner = null; block.Statements.Add(this.BuildClosureForEach(qe.Source, ref locTarget, out inner, this.currentMethod.Body.Scope)); inner.Statements.Add(new AssignmentStatement(locval, Literal.True)); inner.Statements.Add(new Branch(Literal.True, exit)); block.Statements.Add(new AssignmentStatement(locval, Literal.False)); block.Statements.Add(exit); block.Statements.Add(new ExpressionStatement(locval)); BlockExpression be = new BlockExpression(block, SystemTypes.Boolean); return this.VisitBlockExpression(be); }
public override Node VisitQueryExists(QueryExists exists) { base.VisitQueryExists(exists); return this.Compose(exists, this.GetComposer(exists.Source)); }
public override Node VisitQueryExists(QueryExists exists) { base.VisitQueryExists(exists); return(this.Compose(exists, this.GetComposer(exists.Source))); }
public EventingVisitor(Action<QueryExists> visitQueryExists) { VisitedQueryExists += visitQueryExists; } public event Action<QueryExists> VisitedQueryExists; public override Node VisitQueryExists(QueryExists exists) { if (VisitedQueryExists != null) VisitedQueryExists(exists); return base.VisitQueryExists(exists); }