Commit Graph

1 Commits

Author SHA1 Message Date
Daniel Zuncke 0b3946f9f5
Fix issue 578
Error description:
In formatColon() the colon that should match a question mark gets
selected as the default case of the if-else ladder which is a guaranteed
" : ". Amongst the previous one there is the associated array matcher
which is selected since this is happening in an aa (it just checks for
surrounding []).

Solution:
Harden associated array if-condition. Existing data does not contain
enough information, store ternary conditional colon indices in
an array in ASTInformation. Before an associated array is matched,
confirm that it isn't part of ternary conditional.
If it is a ternary colon, it will fall through the if-ladder like
before.
2023-10-20 17:51:55 +02:00