wip: fix transform order
This commit is contained in:
@@ -31,9 +31,6 @@ export const rewriteExpression: NodeTransform = (node, context) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (node.type === NodeTypes.IF) {
|
||||
for (let i = 0; i < node.branches.length; i++) {}
|
||||
} else if (node.type === NodeTypes.FOR) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,10 +99,7 @@ function convertExpression(
|
||||
})
|
||||
|
||||
return {
|
||||
type: NodeTypes.EXPRESSION,
|
||||
content: '',
|
||||
isStatic: false,
|
||||
loc: node.loc,
|
||||
...node,
|
||||
children
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export const transformFor = createStructuralDirectiveTransform(
|
||||
|
||||
if (aliases) {
|
||||
// TODO inject identifiers to context
|
||||
// and remove on exit
|
||||
context.replaceNode({
|
||||
type: NodeTypes.FOR,
|
||||
loc: node.loc,
|
||||
|
||||
Reference in New Issue
Block a user