public SlicedExpression(IExpression targetExpression, SliceExpression sliceExpression) { this.targetExpression = targetExpression; this.sliceExpression = sliceExpression; }
private IExpression CompileIndexedExpression(IExpression term) { IExpression indexpr = null; IExpression endexpr = null; if (!this.TryCompile(TokenType.Separator, ":")) { indexpr = this.CompileExpression(); if (!this.TryCompile(TokenType.Separator, ":")) { this.CompileToken(TokenType.Separator, "]"); if (indexpr != null) return new IndexedExpression(term, indexpr); return new SlicedExpression(term, new SliceExpression(null, null)); } if (this.TryCompile(TokenType.Separator, "]")) return new SlicedExpression(term, new SliceExpression(indexpr, endexpr)); endexpr = this.CompileExpression(); } else endexpr = this.CompileExpression(); this.CompileToken(TokenType.Separator, "]"); SliceExpression sexpr = new SliceExpression(indexpr, endexpr); return new SlicedExpression(term, sexpr); }