Fix some errors.
Now errors collected by the compilation stage (check, transform, generate etc.)
Also incorporate #208.
|GrammarError| captures stack in v8.