throw syntax errors instead of semantic ones. Also, throw all encountered errors instead of just the first.
Merge pull request #3 from Q42/master

Throw syntax errors instead of semantic errors upon compilation failure