Within the same block, .. conditionX associates with the nearest condition1 .. condition2 lexically above it. So in:
if (cond1 .. cond2) { if ( .. condA) { } }
if ( .. cond3) { }
if (cond4 .. cond5) { if (condB .. condC) }
if ( .. cond6) { }
.. cond3 would associate with cond1 .. cond2
.. condA would not, because its in a different block (it would be an orphan)
.. cond6 would associate with cond4 .. cond5 (it would not "see" condB .. condC because that is in a different block)
In terms of parsing, the handler for .. conditionX would search backwards until it found a conditionV .. conditionW or the beginning of the block. Then the conditionV .. conditionW would be "informed" of the .. conditionX
(Updated to add paragraph about parsing) |