MCPcopy Create free account
hub / github.com/Snapchat/Valdi / transformSourceFile

Method transformSourceFile

compiler/companion/src/JSXProcessor.ts:1254–1271  ·  view source on GitHub ↗
(
    node: ts.SourceFile,
    outputState: JSXOutputState,
    transformContext: ts.TransformationContext,
  )

Source from the content-addressed store, hash-verified

1252 }
1253
1254 private transformSourceFile(
1255 node: ts.SourceFile,
1256 outputState: JSXOutputState,
1257 transformContext: ts.TransformationContext,
1258 ): ts.SourceFile {
1259 const newStatements: ts.Statement[] = [];
1260
1261 for (const statement of node.statements) {
1262 const result = this.transformNode(statement, outputState, transformContext);
1263 newStatements.push(this.toStatement(result, transformContext));
1264 }
1265
1266 return this.doUpdateSourceFileNode(
1267 node,
1268 this.flattenBlocks(node, node.statements, newStatements),
1269 transformContext,
1270 );
1271 }
1272
1273 private transformNode(
1274 node: ts.Node,

Callers 1

makeTransformersMethod · 0.95

Calls 5

transformNodeMethod · 0.95
toStatementMethod · 0.95
flattenBlocksMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected