:sweat: rewrite of the CoffeeScript compiler with proper compiler design principles and a focus on robustness and extensibility
BSD 3-Clause "New" or "Revised" License
1.84k
stars
110
forks
source link
Fix duplicate vars at top level #349
Closed
ef4 closed 9 years ago
To see the problem this patch fixes, look at the first line of lib/cli.js:
The Program node handler was attempting to deduplicate with
nub
, but doing so over a list of JS.Identifiers, not a list of plain strings.Since most callers of
declarationsNeededRecursive
are more interested in the set of names than the identifier nodes, I changed it to do that.