示例#1
0
        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)));
        }
示例#2
0
 protected override System.Linq.Expressions.Expression VisitSubExpression(SubExpressionExpression subex)
 {
     return(HandlebarsExpression.SubExpression(
                Visit(subex.Expression)));
 }