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.SubExpressionExpression( HandlebarsExpression.HelperExpression( path.Path, helperArguments))); }
protected override Expression VisitSubExpression(SubExpressionExpression subex) { return(HandlebarsExpression.SubExpressionExpression( Visit(subex.Expression))); }