MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / cfIncludeCallTemplate

Function cfIncludeCallTemplate

src/extraction/languages/cfscript.ts:49–57  ·  view source on GitHub ↗

The literal template `cfinclude(template="x.cfm")` or `cfinclude("x.cfm")` names.

(node: SyntaxNode, source: string)

Source from the content-addressed store, hash-verified

47
48/** The literal template `cfinclude(template="x.cfm")` or `cfinclude("x.cfm")` names. */
49function cfIncludeCallTemplate(node: SyntaxNode, source: string): string | null {
50 const args = getChildByField(node, 'arguments');
51 if (!args) return null;
52 for (const arg of args.namedChildren) {
53 const named = templateArgument(arg, source);
54 if (named) return named;
55 }
56 return literalString(args.namedChildren[0], source);
57}
58
59/** A component name or dotted component path (`Batch`, `contenscms.core.queue.Batch`). */
60const COMPONENT_PATH = /^[A-Za-z_][\w$-]*(?:\.[A-Za-z_][\w$-]*)*$/;

Callers 1

cfscript.tsFile · 0.85

Calls 3

getChildByFieldFunction · 0.90
templateArgumentFunction · 0.85
literalStringFunction · 0.85

Tested by

no test coverage detected