예제 #1
0
        public ExprNode Copy(ExprNode exprNode)
        {
            var expression = StatementSpecMapper.Unmap(exprNode);
            var mapEnv = services.StatementSpecMapEnv;
            var mapContext = new StatementSpecMapContext(contextCompileTimeDescriptor, mapEnv);
            var copy = StatementSpecMapper.MapExpression(expression, mapContext);

            statementSpecRaw.TableExpressions.AddAll(mapContext.TableExpressions);
            copy.Accept(visitor);

            return copy;
        }
예제 #2
0
        private static Pair<ExprNode, StatementSpecMapContext> GetExprDeclaredNode(
            Expression expression,
            ICollection<ExpressionDeclItem> stmtLocalExpressions,
            ContextCompileTimeDescriptor contextCompileTimeDescriptor,
            StatementSpecMapEnv mapEnv)
        {
            var mapContext = new StatementSpecMapContext(contextCompileTimeDescriptor, mapEnv);
            foreach (var item in stmtLocalExpressions) {
                mapContext.AddExpressionDeclarations(item);
            }

            var body = StatementSpecMapper.MapExpression(expression, mapContext);
            return new Pair<ExprNode, StatementSpecMapContext>(body, mapContext);
        }
예제 #3
0
        private static Pair<ExprNode, StatementSpecMapContext> GetExprDeclaredNode(
            Expression expression,
            ICollection<ExpressionDeclItem> stmtLocalExpressions,
            ContextCompileTimeDescriptor contextCompileTimeDescriptor,
            StatementSpecMapEnv mapEnv,
            LazyAllocatedMap<HashableMultiKey, AggregationMultiFunctionForge> plugInAggregations,
            IList<ExpressionScriptProvided> scripts)
        {
            var mapContext = new StatementSpecMapContext(contextCompileTimeDescriptor, mapEnv, plugInAggregations, scripts);
            foreach (var item in stmtLocalExpressions) {
                mapContext.AddExpressionDeclaration(item);
            }

            var body = StatementSpecMapper.MapExpression(expression, mapContext);
            return new Pair<ExprNode, StatementSpecMapContext>(body, mapContext);
        }