Add Exceptions to Prelude #15

Merged
probablycorey merged 6 commits from add-exceptions into main 2025-10-31 17:05:07 +00:00
Showing only changes of commit d957675ac8 - Show all commits

View File

@ -236,7 +236,12 @@ export const getStringParts = (node: SyntaxNode, input: string) => {
}
})
return { parts, hasInterpolation: parts.length > 0 }
// hasInterpolation means the string has interpolation ($var) or escape sequences (\n)
// A simple string like 'hello' has one StringFragment but no interpolation
const hasInterpolation = parts.some(
(p) => p.type.id === terms.Interpolation || p.type.id === terms.EscapeSeq
)
return { parts, hasInterpolation }
}
export const getDotGetParts = (node: SyntaxNode, input: string) => {