visitStringLiteral method

  1. @override
Future<Element> visitStringLiteral(
  1. StringLiteral node
)
override

Implementation

@override
Future<Element> visitStringLiteral(StringLiteral node) async {
  // TODO(mateusfccp): Once we have string literals with interpolation, we should only consider them const if all the internal expressions are const
  return LiteralElement(
    constant: true,
    constantValue: node.literal.lexeme.substring(1, node.literal.lexeme.length - 1),
    type: const StringType(),
  );
}