* 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)
| 99 | * does. |
| 100 | */ |
| 101 | function 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. |