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

Function templateArgument

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

30
31/** The value of a `template=…` argument or attribute, when it is a literal string. */
32function templateArgument(node: SyntaxNode, source: string): string | null {
33 if (node.type !== 'assignment_expression') return null;
34 const left = getChildByField(node, 'left');
35 if (left?.type !== 'identifier' || getNodeText(left, source).toLowerCase() !== 'template') return null;
36 return literalString(getChildByField(node, 'right'), source);
37}
38
39/**
40 * 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