function pushTokens(block, str, styleName) {
	        var isEmptyStr = str === '';
	        var strs = str.split('\n');
	        var lines = block.lines;

	        for (var i = 0; i < strs.length; i++) {
	            var text = strs[i];
	            var token = {
	                styleName: styleName,
	                text: text,
	                isLineHolder: !text && !isEmptyStr
	            };

	            // The first token should be appended to the last line.
	            if (!i) {
	                var tokens = (lines[lines.length - 1] || (lines[0] = {tokens: []})).tokens;

	                // Consider cases:
	                // (1) ''.split('\n') => ['', '\n', ''], the '' at the first item
	                // (which is a placeholder) should be replaced by new token.
	                // (2) A image backage, where token likes {a|}.
	                // (3) A redundant '' will affect textAlign in line.
	                // (4) tokens with the same tplName should not be merged, because
	                // they should be displayed in different box (with border and padding).
	                var tokensLen = tokens.length;
	                (tokensLen === 1 && tokens[0].isLineHolder)
	                    ? (tokens[0] = token)
	                    // Consider text is '', only insert when it is the "lineHolder" or
	                    // "emptyStr". Otherwise a redundant '' will affect textAlign in line.
	                    : ((text || !tokensLen || isEmptyStr) && tokens.push(token));
	            }
	            // Other tokens always start a new line.
	            else {
	                // If there is '', insert it as a placeholder.
	                lines.push({tokens: [token]});
	            }
	        }
	    }
For example: 'some text {a|some text}other text{b|some text}xxx{c|}xxx'
Also consider 'bbbb{a|xxx\nzzz}xxxx\naaaa'.

@public
@param {string} text
@param {Object} style
@return {Object} block
{
     width,
     height,
     lines: [{
         lineHeight,
         width,
         tokens: [[{
             styleName,
             text,
             width,      // include textPadding
             height,     // include textPadding
             textWidth, // pure text width
             textHeight, // pure text height
             lineHeihgt,
             font,
             textAlign,
             textVerticalAlign
         }], [...], ...]
     }, ...]
}
If styleName is undefined, it is plain text.