Created by: andreypopp
Make require inside scopedEval to resolve modules againt current module's filename. This way we can require functions from other modules.
Allows to do require(...)
calls inside macro bodies:
macro sql {
case { _ $expr:expr } => {
var parser = require('sql-parser');
return parser.parse(#{$expr}.token.value);
}
}
This is very useful when you want to embed some other language inside JS (via ES6 tagged template strings for example), see sweet-jsx or sweet-sql for example.