public new BlockNode Update(Interval interval, IEnumerable <CrawlSyntaxNode> children, BlockScope scope)
        {
            List <CrawlSyntaxNode> newchildren = children.ToList();

            if (Interval.Equals(interval) && AreEqual(newchildren) && scope == Scope)
            {
                return(this);
            }

            var green = new GreenBlockNode(NodeType.Block, interval, newchildren.Select(ExtractGreenNode), scope);

            return((BlockNode)Translplant(green.CreateRed(null, 0)));
        }
Ejemplo n.º 2
0
        public static BlockNode Block(Interval interval, IEnumerable <CrawlSyntaxNode> statements)
        {
            GreenBlockNode greenBlock = new GreenBlockNode(NodeType.Block, interval, statements.Select(s => s.Green), null);

            return((BlockNode)greenBlock.CreateRed(null, 0));
        }