Here is a minimal example in VS Code:

and on GitHub.
Basically, { in line 3 is just highlighted in a wrong way, but does not affect anything after it. But } in line 4 makes all the following code till the end of the file highlighted as content of a string literal - i.e. not highlighted as code.