Skip to content

src: add require transform pipeline

This feature simply passes module text content and filename through a transformer function which could be used for things like applying AST transforms to the source before it is compiled.

This is just an idea I'm playing with, I could use some feedback. Is this something people want? Is this a reasonable approach?

The ability to intercept the text content would make it easier to do several things like transpiling code, injecting code coverage hooks or applying custom instrumentation.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

src

Merge request reports

Loading