|
|
@ -105,11 +105,9 @@ export default class Statement { |
|
|
|
return this.skip(); |
|
|
|
} |
|
|
|
|
|
|
|
if ( isReference( node, parent ) ) { |
|
|
|
const reference = new Reference( node, scope ); |
|
|
|
references.push( reference ); |
|
|
|
let isReassignment; |
|
|
|
|
|
|
|
if ( parent.type in modifierNodes ) { |
|
|
|
if ( parent && parent.type in modifierNodes ) { |
|
|
|
let subject = parent[ modifierNodes[ parent.type ] ]; |
|
|
|
let depth = 0; |
|
|
|
|
|
|
@ -133,10 +131,15 @@ export default class Statement { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
reference.isReassignment = !depth; |
|
|
|
isReassignment = !depth; |
|
|
|
} |
|
|
|
|
|
|
|
if ( isReference( node, parent ) ) { |
|
|
|
const reference = new Reference( node, scope ); |
|
|
|
references.push( reference ); |
|
|
|
|
|
|
|
reference.isImmediatelyUsed = !readDepth; |
|
|
|
reference.isReassignment = isReassignment; |
|
|
|
|
|
|
|
this.skip(); // don't descend from `foo.bar.baz` into `foo.bar`
|
|
|
|
} |
|
|
|