Пример #1
0
 public ForeachNode(ForeachNode original)
     : base(original)
 {
     this.ValueProvider   = original.ValueProvider;
     this.ForeachToken    = original.ForeachToken.CloneNode();
     this.EndForeachToken = original.EndForeachToken.CloneNode();
     this.ForeachBlock    = (BlockNode?)original.ForeachBlock?.Let(a => a.CloneNode(true));
 }
Пример #2
0
        protected internal override void ReplaceBlock()
        {
            this.NormalizeInterval(ref ForeachToken, ref EndForeachToken, errorHintParent: ForeachToken.MatchNode);

            this.ForeachBlock = new BlockNode(this.NodeProvider);
            this.ForeachBlock.MoveChilds(NodesBetween(ForeachToken, EndForeachToken));

            ForeachToken.AscendantNode !.ReplaceBy(this);
            EndForeachToken.AscendantNode !.Remove();
        }
 public BlockNode CreateElse()
 {
     ElseBlock = new BlockNode(this);
     return(ElseBlock);
 }
 public BlockNode CreateNotAny()
 {
     NotAnyBlock = new BlockNode(this);
     return(NotAnyBlock);
 }