boolean skipCommentsAndLiterals()

in src/main/java/com/google/cloud/spanner/pgadapter/statements/SimpleParser.java [908:935]


  boolean skipCommentsAndLiterals() {
    if (pos >= sql.length()) {
      return true;
    }
    if ((sql.charAt(pos) == 'e' || sql.charAt(pos) == 'E')
        && sql.length() > (pos + 1)
        && sql.charAt(pos + 1) == '\'') {
      pos++;
      return skipQuotedString(true);
    } else if (sql.charAt(pos) == SINGLE_QUOTE || sql.charAt(pos) == DOUBLE_QUOTE) {
      return skipQuotedString(false);
    } else if (sql.charAt(pos) == HYPHEN
        && sql.length() > (pos + 1)
        && sql.charAt(pos + 1) == HYPHEN) {
      return skipSingleLineComment();
    } else if (sql.charAt(pos) == SLASH
        && sql.length() > (pos + 1)
        && sql.charAt(pos + 1) == ASTERISK) {
      return skipMultiLineComment();
    } else if (sql.charAt(pos) == DOLLAR
        && sql.length() > (pos + 1)
        && (sql.charAt(pos + 1) == DOLLAR || isValidIdentifierFirstChar(sql.charAt(pos + 1)))
        && sql.indexOf(DOLLAR, pos + 1) > -1) {
      return skipDollarQuotedString();
    } else {
      return true;
    }
  }