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

Function cfIncludeCallTemplate

src/extraction/languages/cfscript.ts:48–56  ·  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

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