boa
boa copied to clipboard
Move syntax errors from the compiler to the parser
Currently we have some syntax errors that are being thrown in the compiler. They should be already be thrown in the parser.
The best case to search for them is to look for throw_syntax_error
and construct_syntax_error
in boa_engine/src/bytecompiler.rs
. There may be state that must be added during the parsing for all of the errors to be moved to the parsing phase.
After this is fixed, Context::compile
should not need to return a Result
anymore.
After #2027, what's missing here?
There are still some syntax errors in the bytecompiler left: