Fixed parse error for long form assignments

This changes the way brackets are processed inside evaluate_expression
to fix long form assignments at the end of for loops (e.g. a = a + 2).
Also probably a better way of doing things all 'round.