fix: do not use lookbehind regex yet

This commit is contained in:
Evan You 2019-09-26 12:22:31 -04:00
parent 7c030ee899
commit 2e3a1ff3c3
2 changed files with 5 additions and 5 deletions

View File

@ -13,10 +13,6 @@ import { getInnerRange } from '../utils'
import { RENDER_LIST } from '../runtimeConstants'
import { processExpression } from './transformExpression'
const forAliasRE = /([\s\S]*?)(?:(?<=\))|\s+)(?:in|of)\s+([\s\S]*)/
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/
const stripParensRE = /^\(|\)$/g
export const transformFor = createStructuralDirectiveTransform(
'for',
(node, dir, context) => {
@ -64,6 +60,10 @@ export const transformFor = createStructuralDirectiveTransform(
}
)
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/
const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/
const stripParensRE = /^\(|\)$/g
interface ForParseResult {
source: ExpressionNode
value: ExpressionNode | undefined