createCallExpression,
CallExpression,
ElementTypes,
- ConstantTypes
+ ConstantTypes,
+ createCompoundExpression
} from '../ast'
import { isText } from '../utils'
import { CREATE_TEXT } from '../runtimeHelpers'
const next = children[j]
if (isText(next)) {
if (!currentContainer) {
- currentContainer = children[i] = {
- type: NodeTypes.COMPOUND_EXPRESSION,
- loc: child.loc,
- children: [child]
- }
+ currentContainer = children[i] = createCompoundExpression(
+ [child],
+ child.loc
+ )
}
// merge adjacent text node into current
currentContainer.children.push(` + `, next)