MCPcopy Index your code
hub / github.com/formatjs/formatjs / parseFile

Function parseFile

packages/cli-lib/hbs_extractor.ts:43–57  ·  view source on GitHub ↗
(
  source: string,
  fileName: string,
  options: any
)

Source from the content-addressed store, hash-verified

41}
42
43export function parseFile(
44 source: string,
45 fileName: string,
46 options: any
47): void {
48 const ast = preprocess(source)
49 traverse(ast, {
50 MustacheStatement(node: ASTv1.MustacheStatement) {
51 extractText(node, fileName, options)
52 },
53 SubExpression(node: ASTv1.SubExpression) {
54 extractText(node, fileName, options)
55 },
56 })
57}

Callers 2

processFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected