Syntax mistakes confuse the parser. At least the error message identifies the line that has the mistake. Some mistakes, such as a missing or extra quote, can be harder to find.
GDScript's use of indentation for structuring probably makes it easier to find problems than in other languages that ignore indentation and depend solely on delimiters such as braces { }.