adambeynon/opal — Issue #61: Check compiled Ruby for Javascript syntax errors.
Author: meh
Created: 2012-01-12 15:33:47+00:00
State: open
Labels: feature, parser, priority

This is really a must for debugging, not all browsers report syntax errors on included scripts, so we should really check the compiled code for them and raise a parse error.

We could either write our own javascript parser or use therubyracer to do a simple check. We should also be able somehow to infer the originating Ruby line.

This is required because it's really easy to write buggy inlined js (forgetting parenthesis and the like) and it would result in a LoadError when requiring said code.