examples/webpack/dist/app.e100c23eefa4ef71b346.js
function convertPropertyBinding(builder, nameResolver, implicitReceiver, expression, bindingId) {
    var /** @type {?} */ currValExpr = createCurrValueExpr(bindingId);
    var /** @type {?} */ stmts = [];
    if (!nameResolver) {
        nameResolver = new DefaultNameResolver();
    }
    var /** @type {?} */ visitor = new _AstToIrVisitor(builder, nameResolver, implicitReceiver, VAL_UNWRAPPER_VAR, bindingId, false);
    var /** @type {?} */ outputExpr = expression.visit(visitor, _Mode.Expression);
    if (!outputExpr) {
        // e.g. an empty expression was given
        return null;
    }
    if (visitor.temporaryCount) {
        for (var /** @type {?} */ i = 0; i < visitor.temporaryCount; i++) {
            stmts.push(temporaryDeclaration(bindingId, i));
        }
    }
    if (visitor.needsValueUnwrapper) {
        var /** @type {?} */ initValueUnwrapperStmt = VAL_UNWRAPPER_VAR.callMethod('reset', []).toStmt();
        stmts.push(initValueUnwrapperStmt);
    }
    stmts.push(currValExpr.set(outputExpr).toDeclStmt(null, [__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["k" /* StmtModifier */].Final]));
    if (visitor.needsValueUnwrapper) {
        return new ConvertPropertyBindingResult(stmts, currValExpr, VAL_UNWRAPPER_VAR.prop('hasWrappedValue'));
    }
    else {
        return new ConvertPropertyBindingResult(stmts, currValExpr, null);
    }
}
function convertPropertyBinding(builder, nameResolver, implicitReceiver, expression, bindingId) {
    var /** @type {?} */ currValExpr = createCurrValueExpr(bindingId);
    var /** @type {?} */ stmts = [];
    if (!nameResolver) {
        nameResolver = new DefaultNameResolver();
    }
    var /** @type {?} */ visitor = new _AstToIrVisitor(builder, nameResolver, implicitReceiver, VAL_UNWRAPPER_VAR, bindingId, false);
    var /** @type {?} */ outputExpr = expression.visit(visitor, _Mode.Expression);
    if (!outputExpr) {
        // e.g. an empty expression was given
        return null;
    }
    if (visitor.temporaryCount) {
        for (var /** @type {?} */ i = 0; i < visitor.temporaryCount; i++) {
            stmts.push(temporaryDeclaration(bindingId, i));
        }
    }
    if (visitor.needsValueUnwrapper) {
        var /** @type {?} */ initValueUnwrapperStmt = VAL_UNWRAPPER_VAR.callMethod('reset', []).toStmt();
        stmts.push(initValueUnwrapperStmt);
    }
    stmts.push(currValExpr.set(outputExpr).toDeclStmt(null, [__WEBPACK_IMPORTED_MODULE_3__output_output_ast__["k" /* StmtModifier */].Final]));
    if (visitor.needsValueUnwrapper) {
        return new ConvertPropertyBindingResult(stmts, currValExpr, VAL_UNWRAPPER_VAR.prop('hasWrappedValue'));
    }
    else {
        return new ConvertPropertyBindingResult(stmts, currValExpr, null);
    }
}
function convertPropertyBinding ( builder , nameResolver , implicitReceiver , expression , bindingId ) { var /** @type {?} */ currValExpr = createCurrValueExpr ( bindingId ) ; var /** @type {?} */ stmts = [ ] ; if ( ! nameResolver ) { nameResolver = new DefaultNameResolver ( ) ; } var /** @type {?} */ visitor = new _AstToIrVisitor ( builder , nameResolver , implicitReceiver , VAL_UNWRAPPER_VAR , bindingId , false ) ; var /** @type {?} */ outputExpr = expression . visit ( visitor , _Mode . Expression ) ; if ( ! outputExpr ) { // e.g. an empty expression was given return null ; } if ( visitor . temporaryCount ) { for ( var /** @type {?} */ i = 0 ; i < visitor . temporaryCount ; i ++ ) { stmts . push ( temporaryDeclaration ( bindingId , i ) ) ; } } if ( visitor . needsValueUnwrapper ) { var /** @type {?} */ initValueUnwrapperStmt = VAL_UNWRAPPER_VAR . callMethod ( 'reset' , [ ] ) . toStmt ( ) ; stmts . push ( initValueUnwrapperStmt ) ; } stmts . push ( currValExpr . set ( outputExpr ) . toDeclStmt ( null , [ __WEBPACK_IMPORTED_MODULE_3__output_output_ast__ [ "k" /* StmtModifier */ ] . Final ] ) ) ; if ( visitor . needsValueUnwrapper ) { return new ConvertPropertyBindingResult ( stmts , currValExpr , VAL_UNWRAPPER_VAR . prop ( 'hasWrappedValue' ) ) ; } else { return new ConvertPropertyBindingResult ( stmts , currValExpr , null ) ; } }
Converts the given expression AST into an executable output AST, assuming the expression is
used in a property binding.
@param {?} builder
@param {?} nameResolver
@param {?} implicitReceiver
@param {?} expression
@param {?} bindingId
@return {?}
Converts the given expression AST into an executable output AST assuming the expression is used in a property binding .