コード例 #1
0
        public static void AddChainablesInternal(
            EsperEPL2GrammarParser.ChainableElementsContext ctx,
            IDictionary <ITree, ExprNode> astExprNodeMap,
            IList <Chainable> chain)
        {
            foreach (var context in ctx.chainableAtomicWithOpt())
            {
                var       optionalChainable = context.q != null;
                var       atomic            = context.chainableAtomic();
                Chainable chainable;
                if (atomic.chainableArray() != null)
                {
                    var @params = ASTExprHelper.ExprCollectSubNodes(atomic.chainableArray(), 0, astExprNodeMap);
                    chainable = new ChainableArray(false, optionalChainable, @params);
                }
                else
                {
                    chainable = GetChainable(context.chainableAtomic().chainableWithArgs(), optionalChainable, astExprNodeMap);
                }

                chain.Add(chainable);
            }
        }
コード例 #2
0
 public static bool HasChain(EsperEPL2GrammarParser.ChainableElementsContext ctx)
 {
     return(ctx != null && !ctx.chainableAtomicWithOpt().IsEmpty());
 }