It's a class file.
class Instrumenter
- Methods:
- instrumentSync: It takes
code
,filename
, andinputSourceMap
. It createsbabelOpts
and generate sourcemap and AST with@babel/core#transformSync
. ThebabelOpts
is using their own pluginprogramVisitor
.readInitialCoverage
is used against the AST generated. - instrument: Callback style... not sure if I'm interested.
- lastFileCoverage: returns
fileCoverage
property. - lastSourceMap: returns
sourceMap
property.
- instrumentSync: It takes
This is where programVisitor
is from. It contains the VisitState
class.
class VisitState
- Methods:
- shouldIgnore:
- hintFor:
- maybeAssignSourceMapURL:
- counterNeedsHoisting:
- onEnter:
- onExit:
- setAttr:
- getAttr:
- increase:
- insertCounter:
- insertStatementCounter:
- insertFunctionCounter:
- getBranchIncrement:
- findLeaves:
To be continued