implicitString method Null safety

StringLiteral? implicitString()

Implementation

StringLiteral? implicitString() {
  if (next(TokenType.string)) {
    var result = prefixParselets[TokenType.string]?.parse(this, _current);
    if (result != null) {
      return result as StringLiteral;
    }
    return null;
  }
  /*else if (next(TokenType.text)) {

  }*/

  return null;
}