fix($parse): ternary and assignment operator precedence

Properly handle assignemnts inside ternary operators

Closes #8484