Closed ryyppy closed 3 years ago
OCaml has this really neat feature of setting the line number / filename context of an executed script:
# 200 "some/file.mdx" let a 1;
which will report an error like this:
File "some/file.mdx", line 201, characters 7-8: Error: Syntax error
Here, the line number is correctly reported as 201. This can potentially replace the weird regex magic done in scripts/test-examples.js.
201
scripts/test-examples.js
\cc @rizo for giving the tip
this is not needed anymore, we got a way better way on testing all snippets that's at least 20 times faster
OCaml has this really neat feature of setting the line number / filename context of an executed script:
which will report an error like this:
Here, the line number is correctly reported as
201
. This can potentially replace the weird regex magic done inscripts/test-examples.js
.\cc @rizo for giving the tip