When you make a syntax error, the script editor only highlights the first error, even when more syntax error follow that first one. This happens because the following script cannot be parsed due to the preceding syntax error.
When you make a reference error, the script editor highlights each error independently of its position in the script.
So, when a syntax error precedes a reference error, only the foregoing syntax error is highlighted.