isTemplateNode,
isSlotOutlet,
injectProp,
- findDir
+ findDir,
+ forAliasRE
} from '../utils'
import {
RENDER_LIST,
}
}
-const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/
// This regex doesn't cover the case if key or index aliases have destructuring,
// but those do not make sense in the first place, so this works in practice.
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/
NodeTypes,
SimpleExpressionNode,
createRoot,
+ forAliasRE,
parserOptions,
transform,
walkIdentifiers
return code
}
-const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/
-
function processExp(exp: string, dir?: string): string {
if (/ as\s+\w|<.*>|:/.test(exp)) {
if (dir === 'slot') {