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

Function templateArgument

src/extraction/languages/cfscript.ts:31–36  ·  view source on GitHub ↗

The value of a `template=…` argument or attribute, when it is a literal string.

(node: SyntaxNode, source: string)

Source from the content-addressed store, hash-verified

29
30/** The value of a `template=…` argument or attribute, when it is a literal string. */
31function templateArgument(node: SyntaxNode, source: string): string | null {
32 if (node.type !== 'assignment_expression') return null;
33 const left = getChildByField(node, 'left');
34 if (left?.type !== 'identifier' || getNodeText(left, source).toLowerCase() !== 'template') return null;
35 return literalString(getChildByField(node, 'right'), source);
36}
37
38/**
39 * Whether a call is `cfinclude(…)` — the function form of `include` and of

Callers 2

cfIncludeCallTemplateFunction · 0.85
cfscript.tsFile · 0.85

Calls 3

getChildByFieldFunction · 0.90
getNodeTextFunction · 0.90
literalStringFunction · 0.85

Tested by

no test coverage detected