This commit is contained in:
Tony Garnock-Jones 2021-12-03 15:29:20 +01:00
parent d8b60ccf76
commit 3486ec928e
1 changed files with 4 additions and 0 deletions

View File

@ -122,6 +122,10 @@ export function expand(tree: Items, ctx: ExpansionContext): Items {
const walk = (tree: Items): Items => expand(tree, ctx);
const maybeWalk = (tree?: Items) : Items | undefined => (tree === void 0) ? tree : walk(tree);
// Unfortunately, because of the incredibly naive repeated
// traversal of the syntax tree we're doing, the order of the
// following transformations matters.
xf(ctx.parser.duringStatement, (s, t) => {
// TODO: untyped template
const sa = compilePattern(s.pattern);