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

Function isStringType

src/extraction/syntax-tokens.ts:101–112  ·  view source on GitHub ↗

* A node whose leaves are string content unless an interpolation interrupts. * * `string` covers the bulk (`string_literal`, `interpreted_string_literal`, * `raw_string_literal`, `encapsed_string`, `string_content`); the rest are the * spellings that avoid the word — Rust/Go/C character literals

(type: string)

Source from the content-addressed store, hash-verified

99 * does.
100 */
101function isStringType(type: string): boolean {
102 return (
103 type.includes('string') ||
104 type.includes('heredoc') ||
105 type.includes('regex') ||
106 type === 'char_literal' ||
107 type === 'character' ||
108 type === 'character_literal' ||
109 type === 'rune_literal' ||
110 type === 'quoted_attribute_value'
111 );
112}
113
114/**
115 * Where code resumes inside a string.

Callers 2

visitFunction · 0.85
leafClassFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected