Dotty Documentation

0.11.0-bin-SNAPSHOT

class StringInterpolatorOpt
extends MiniPhase

MiniPhase to transform s and raw string interpolators from using StringContext to string concatenation. Since string concatenation uses the Java String builder, we get a performance improvement in terms of these two interpolators.

More info here: https://medium.com/@dkomanov/scala-string-interpolation-performance-21dc85e83afd

[-] Constructors

StringInterpolatorOpt ( )

[-] Members

[+] private object Literals

Matches a list of constant literals

[+] private object SOrRawInterpolator

Matches an s or raw string interpolator

[+] private object StringContextApply
[+] private object StringContextIntrinsic

Match trees that resemble s and raw string interpolations. In the case of the s interpolator, escapes the string constants. Exposes the string constants as well as the variable references.

[+] override def phaseName : String

A name given to the Phase that can be used to debug the compiler. For instance, it is possible to print trees after a given phase using:

$ ./bin/dotc -Xprint:<phaseNameHere> sourceFile.scala
[+] override def transformApply ( tree: Apply ) ( implicit ctx: Context ) : Tree
[+] private def transformInterpolator ( tree: Tree ) ( implicit ctx: Context ) : Tree