protected Expression genGoogMsgPlaceholder ( MsgPlaceholderNode msgPhNode ) { List < Expression > contentChunks = new ArrayList <> ( ) ; for ( StandaloneNode contentNode : msgPhNode . getChildren ( ) ) { if ( contentNode instanceof MsgHtmlTagNode && ! isComputableAsJsExprsVisitor . exec ( contentNode ) ) { // This is a MsgHtmlTagNode that is not computable as JS expressions. Visit it to // generate code to define the 'htmlTag<n>' variable. visit ( contentNode ) ; contentChunks . add ( id ( "htmlTag" + contentNode . getId ( ) ) ) ; } else if ( contentNode instanceof CallNode ) { // If the CallNode has any CallParamContentNode children that are not computable as JS // expressions, visit them to generate code to define their respective 'param<n>' variables. CallNode callNode = ( CallNode ) contentNode ; for ( CallParamNode grandchild : callNode . getChildren ( ) ) { if ( grandchild instanceof CallParamContentNode && ! isComputableAsJsExprsVisitor . exec ( grandchild ) ) { visit ( grandchild ) ; } } Expression call = genCallCodeUtils . gen ( callNode , templateAliases , translationContext , errorReporter , master . getExprTranslator ( ) ) ; contentChunks . add ( call ) ; } else { List < Expression > chunks = genJsExprsVisitor . exec ( contentNode ) ; contentChunks . add ( CodeChunkUtils . concatChunks ( chunks ) ) ; } } return CodeChunkUtils . concatChunks ( contentChunks ) ; }
Returns a code chunk for the given placeholder node .