Skip to content

Commit

Permalink
with statements WIP 2
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Aug 31, 2023
1 parent bc3b07d commit b5f49c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/serialize/parseFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,10 @@ function resolveFunctionInfo(
// Initializing properties of `internalVars` needs to happen before processing child functions,
// as external vars in child functions can become internal vars in this function.
// Store for later any which have no trails, as that indicates that the binding is accessed
// within a `with () {}` block, and mist not be renamed.
// within a `with () {}` block, and must not be renamed.
// TODO: This is hacky as hell. There must be a better way to do it.
// I also don't think it works properly.
// e.g. `() => { let x; return [x => x, () => { with ({}) return () => x; }]}`
// TODO: Check if internal vars are always created for all functions above where binding is.
// TODO: Can this logic be combined with logic that prevents functions names being changed?
const internalVarTrails = [],
Expand Down

0 comments on commit b5f49c2

Please sign in to comment.