It checks syntax of the currently type line of code only so you can spot errors right away. See help for details.
>What kind of syntax is this supposed to check? I just wrote the following in a button click, and the highlighting went away on all of it and obviously none of it is valid:
>
<snip>
--sb--