Parse error with multiple lines code

To me, it looks like the problem comes from the indentation.
If you indent your line 77 as you did at 73, everything should be fine, both color highlighting as well as multiline evaluation.
I had the same kind of problems before, as mentioned here (if you want more exact explanations):

not an expert, my 2cents