private static SubExpressionExpression BuildSubExpression(IEnumerator <object> enumerator) { object item = GetNext(enumerator); var path = item as PathExpression; if (path == null) { throw new HandlebarsCompilerException("Found a sub-expression that does not contain a path expression"); } var helperArguments = AccumulateSubExpression(enumerator); return(HandlebarsExpression.SubExpression( HandlebarsExpression.Helper( path.Path, helperArguments))); }
protected override System.Linq.Expressions.Expression VisitSubExpression(SubExpressionExpression subex) { return(HandlebarsExpression.SubExpression( Visit(subex.Expression))); }