nl_tokens: 引用求值
pl_tokens: function ( ast , isVal ) { if ( ast . prue ) { var define = this . defines [ ast . id ] ; if ( utils . isArray ( define ) ) { return this . _render ( define ) ; } if ( ast . id in this . config . unescape ) ast . prue = false ; } var escape = this . config . escape ; var isSilent = this . silence || ast . leader === "$!" ; var isfn = ast . args !== undefined ; var context = this . context ; var ret = context [ ast . id ] ; var local = this . getLocal ( ast ) ; var text = Velocity . Helper . getRefText ( ast ) ; if ( text in context ) { return ( ast . prue && escape ) ? convert ( <mask> [ text ] ) : context [ text ] ; } if ( ret !== undefined && isfn ) { ret = this . getPropMethod ( ast , context , ast ) ; } if ( local . isLocaled ) ret = local [ 'value' ] ; if ( ast . path ) { utils . some ( ast . path , function ( property , i , len ) { if ( ret === undefined ) { this . _throw ( ast , property ) ; } // 第三个参数，返回后面的参数ast ret = this . getAttributes ( property , ret , ast ) ; } , this ) ; } if ( isVal && ret === undefined ) { ret = isSilent ? '' : Velocity . Helper . getRefText ( ast ) ; } ret = ( ast . prue && escape ) ? convert ( ret ) : ret ; return ret ; }