nl_tokens: ## mustacheCore . makeStringBranchRenderer Return a renderer function that evalutes to a string and caches the evaluator on the scope .
pl_tokens: function ( mode , expressionString , state ) { var exprData = core . expression . parse ( expressionString ) , // Use the full mustache expression as the cache key. fullExpression = mode + expressionString ; // A branching renderer takes truthy and falsey renderer. var branchRenderer = function branchRenderer ( scope , truthyRenderer , falseyRenderer ) { //!steal-remove-start if ( process . env . NODE_ENV !== 'production' ) { scope . set ( 'scope.filename' , state . filename ) ; scope . set ( 'scope.lineNumber' , state . lineNo ) ; } //!steal-remove-end // Check the scope's cache if the evaluator already exists for performance. var evaluator = scope . __cache [ fullExpression ] ; if ( mode || ! evaluator ) { evaluator = makeEvaluator ( <mask> , null , mode , exprData , truthyRenderer , falseyRenderer , true ) ; if ( ! mode ) { scope . __cache [ fullExpression ] = evaluator ; } } var gotObservableValue = evaluator [ canSymbol . for ( "can.onValue" ) ] , res ; // Run the evaluator and return the result. if ( gotObservableValue ) { res = canReflect . getValue ( evaluator ) ; } else { res = evaluator ( ) ; } return res == null ? "" : "" + res ; } ; branchRenderer . exprData = exprData ; return branchRenderer ; }