visitStringInterpolationExpr method
Implementation
@override
void visitStringInterpolationExpr(ASTStringInterpolation node) {
final interpolations = <String>[];
for (final expr in node.interpolations) {
expr.accept(this);
if (!expr.isConstValue) {
return;
}
interpolations.add(_lexicon.stringify(expr.value));
}
var text = node.text;
for (var i = 0; i < interpolations.length; ++i) {
text = text.replaceAll(
'${_lexicon.codeBlockStart}$i${_lexicon.codeBlockEnd}',
interpolations[i]);
}
node.value = text;
}