protected override IAbstractBinding CompileBinding(DothtmlBindingNode node, BindingParserOptions bindingOptions, IDataContextStack context) { Expression expression = null; Exception parsingError = null; ITypeDescriptor resultType = null; if (context == null) { parsingError = new DotvvmCompilationException("The DataContext couldn't be evaluated because of the errors above.", node.Tokens); } else { try { expression = bindingExpressionBuilder.Parse(node.Value, (DataContextStack)context, bindingOptions); resultType = new ResolvedTypeDescriptor(expression.Type); } catch (Exception exception) { parsingError = exception; } } return treeBuilder.BuildBinding(bindingOptions, node, context, parsingError, resultType, expression); }