Closed Constellation closed 10 years ago
I've extracted esmangle's isProblematicIfStatement routine to esutils. It covers edge cases. For example,
esmangle
isProblematicIfStatement
esutils
{ type: "IfStatement", test: EXPR, consequent: { type: "LabeledStatement", body: {type: "IfStatement", test: EXPR, consequent: STMT} }, alternate: STMT }
is also an invalid node.
Updated :)
You're the best, Yusuke! I'm going to add assertions for number of errors so we can try to minimise all these tests.
Thank you for merging!!
I've extracted
esmangle
'sisProblematicIfStatement
routine toesutils
. It covers edge cases. For example,is also an invalid node.