nl_tokens: [ invokeAmbiguous ] On stack before : hash inverse program params ... ... On stack after : result of disambiguation This operation is used when an expression like {{ foo }} is provided but we don t know at compile - time whether it is a helper or a path . This operation emits more code than the other options and can be avoided by passing the knownHelpers and knownHelpersOnly flags at compile - time .
pl_tokens: function ( name , helperCall ) { this . context . aliases . functionType = '"function"' ; this . useRegister ( 'helper' ) ; this . emptyHash ( ) ; var helper = this . setupHelper ( 0 , name , helperCall ) ; var helperName = this . lastHelper = this . nameLookup ( 'helpers' , <mask> , 'helper' ) ; var nonHelper = this . nameLookup ( 'depth' + this . lastContext , name , 'context' ) ; var nextStack = this . nextStack ( ) ; if ( helper . paramsInit ) { this . pushSource ( helper . paramsInit ) ; } this . pushSource ( 'if (helper = ' + helperName + ') { ' + nextStack + ' = helper.call(' + helper . callParams + '); }' ) ; this . pushSource ( 'else { helper = ' + nonHelper + '; ' + nextStack + ' = typeof helper === functionType ? helper.call(' + helper . callParams + ') : helper; }' ) ; }