visitSimpleStringLiteral method

  1. @override
void visitSimpleStringLiteral(
  1. SimpleStringLiteral node
)
override

Implementation

@override
void visitSimpleStringLiteral(SimpleStringLiteral node) {
  if (node.parent is ImportDirective) {
    return;
  }
  var hasIssue = false;
  if (node.literal is StringToken) {
    String contentWithQuote = (node.literal as StringToken).valueOrLazySubstring;
    if (contentWithQuote.startsWith("'") && contentWithQuote.endsWith("'")) {
      _nodes.add(node);
      hasIssue = true;
    }
  }
  if (!hasIssue) {
    super.visitSimpleStringLiteral(node);
  }
}