[Scala] Tweak string and interpolation scopes
This commit tweaks string and interpolation related scopes after the scheme of Python and ShellScript.
-
from python use
meta.string.interpolatedandstring.quoted.double.block -
from shell use interpolation scopes.
Scope guidelines request
punctuation.section.interpolation.[begin|end], but$variables are historically scopedpunctuation.definition.variable.This commit (as shellscript) attempt to satisfy both.
Hence
$in${}is scoped punctuation.definition.variable, which may appear odd in the first place.Actually
$is some sort of expansion operator, which adds a variable's or expression's result into containing string. Perl calls it dereferencing operator.Most core syntaxes supporting that kind of syntax struggle with it, currently.
TL;TR This commit aligns scopes with existing core syntaxes even though there are still some caveats. Solving them is however a bigger task affecting various syntaxes. Good consistent alternatives are required first.
Reverted triple-quoted scope to string.quoted.triple as it is also used in C# and Java.
FYI, I will probably not have the time to review this in at least the next 2 weeks.