A completion to convert a string literal into a string literal, example "Hello $na@@"
.
A completion to convert a string literal into a string literal, example "Hello $na@@"
.
When converting a string literal into an interpolator we need to ensure a few cases:
- escape existing $
characters into $$
, which are printed as $$
in order to
escape the TextMate snippet syntax.
- wrap completed name in curly braces s"Hello ${name}_
when the trailing character
can be treated as an identifier part.
- insert the leading s
interpolator.
- place the cursor at the end of the completed name using TextMate $0
snippet syntax.
The string literal, includes an instrumented _CURSOR_
that we need to handle.
The offset position of the cursor, right below @@_CURSOR_
.
Metadata about this interpolation, the location of the leading dollar character and whether the completed name needs to be wrapped in curly braces.
The text of the original source code without the instrumented _CURSOR_
.
A completion to select type members inside string interpolators.
A completion to select type members inside string interpolators.
Example:
// before s"Hello $name.len@@!" // after s"Hello ${name.length()$0}"
the member query, "len" in the example above.
the identifier from where we select a member from, "name" above.
the string literal part of the interpolator trailing the identifier including cursor instrumentation, "len_CURSOR_!" in the example above.
the cursor position where the completion is triggered, @@
in the example above.
the text of the original source file without _CURSOR_
instrumentation.