public virtual Node VisitQuerySingleton(QuerySingleton singleton, QuerySingleton changes, QuerySingleton deletions, QuerySingleton insertions){ this.UpdateSourceContext(singleton, changes); if (singleton == null) return changes; if (changes != null){ if (deletions == null || insertions == null) Debug.Assert(false); else{ } }else if (deletions != null) return null; return singleton; }
public virtual Node VisitQuerySingleton(QuerySingleton singleton){ if (singleton == null) return null; singleton.Source = this.VisitExpression(singleton.Source); return singleton; }
public virtual Differences VisitQuerySingleton(QuerySingleton singleton1, QuerySingleton singleton2){ Differences differences = new Differences(singleton1, singleton2); if (singleton1 == null || singleton2 == null){ if (singleton1 != singleton2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++; return differences; } QuerySingleton changes = (QuerySingleton)singleton2.Clone(); QuerySingleton deletions = (QuerySingleton)singleton2.Clone(); QuerySingleton insertions = (QuerySingleton)singleton2.Clone(); //singleton1.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 VisitQuerySingleton( QuerySingleton singleton ){ if (singleton == null) return null; singleton.Source = (Expression) this.Visit(singleton.Source); if (singleton.Source != null && singleton.Source.Type != null){ singleton.Type = this.typeSystem.GetStreamElementType(singleton.Source, this.TypeViewer); } return singleton; }
public override Node VisitQuerySingleton(QuerySingleton qs) { if (qs == null) return null; qs.Source = this.VisitExpression(qs.Source); if (qs.Type == null || qs.Source == null || qs.Source.Type == null) return null; return qs; }
public override Node VisitQuerySingleton(QuerySingleton singleton){ if (singleton == null) return null; return base.VisitQuerySingleton((QuerySingleton)singleton.Clone()); }
public virtual void VisitQuerySingleton(QuerySingleton singleton){ if (singleton == null) return; this.VisitExpression(singleton.Source); }
public virtual Node VisitQuerySingleton(QuerySingleton singleton1, QuerySingleton singleton2){ if (singleton1 == null) return null; if (singleton2 == null) singleton1.Source = this.VisitExpression(singleton1.Source, null); else singleton1.Source = this.VisitExpression(singleton1.Source, singleton2.Source); return singleton1; }
public override Node VisitQuerySingleton(QuerySingleton qs) { Block block = new Block(new StatementList(4)); Expression feTarget = null; Block inner = null; BlockScope scope = this.currentMethod.Body.Scope; Expression result = new Local(qs.Type); Expression hasOne = new Local(SystemTypes.Boolean); Block brError = new Block(); Block brReturn = new Block(); block.Statements.Add(new AssignmentStatement(hasOne, Literal.False)); block.Statements.Add(this.BuildClosureForEach(qs.Source, ref feTarget, out inner, scope)); inner.Statements.Add(new Branch(hasOne, brError)); inner.Statements.Add(new AssignmentStatement(result, feTarget)); inner.Statements.Add(new AssignmentStatement(hasOne, Literal.True)); block.Statements.Add(new Branch(hasOne, brReturn)); block.Statements.Add(brError); Construct cons = new Construct(); cons.Constructor = new MemberBinding(null, SystemTypes.StreamNotSingletonException.GetConstructor()); block.Statements.Add(new Throw(cons)); block.Statements.Add(brReturn); block.Statements.Add(new ExpressionStatement(result)); return this.VisitBlockExpression(new BlockExpression(block, result.Type)); }
public override Node VisitQuerySingleton( QuerySingleton singleton ) { base.VisitQuerySingleton(singleton); return this.Compose(singleton, this.GetComposer(singleton.Source)); }
public override Node VisitQuerySingleton(QuerySingleton singleton) { base.VisitQuerySingleton(singleton); return(this.Compose(singleton, this.GetComposer(singleton.Source))); }
public EventingVisitor(Action<QuerySingleton> visitQuerySingleton) { VisitedQuerySingleton += visitQuerySingleton; } public event Action<QuerySingleton> VisitedQuerySingleton; public override Node VisitQuerySingleton(QuerySingleton singleton) { if (VisitedQuerySingleton != null) VisitedQuerySingleton(singleton); return base.VisitQuerySingleton(singleton); }