@Nullable private Operator.Kind parseOperator(TokenStream tokens){
  if (tokens.has("=")) {
    tokens.next();
    tokens.expect("=");
    return Operator.Kind.EQUALS;
  }
  if (tokens.has("!")) {
    tokens.next();
    tokens.expect("=");
    return Operator.Kind.NOT_EQUALS;
  }
  if (tokens.has("<")) {
    tokens.next();
    if (tokens.has("=")) {
      tokens.next();
      return Operator.Kind.LESS_EQUAL;
    }
    return Operator.Kind.LESS;
  }
  if (tokens.has(">")) {
    tokens.next();
    if (tokens.has("=")) {
      tokens.next();
      return Operator.Kind.GREATER_EQUAL;
    }
    return Operator.Kind.GREATER;
  }
  return null;
}

@ Nullable private Operator . Kind parseOperator ( TokenStream tokens ) { if ( tokens . has ( "=" ) ) { tokens . next ( ) ; tokens . expect ( "=" ) ; return Operator . Kind . EQUALS ; } if ( tokens . has ( "!" ) ) { tokens . next ( ) ; tokens . expect ( "=" ) ; return Operator . Kind . NOT_EQUALS ; } if ( tokens . has ( "<" ) ) { tokens . next ( ) ; if ( tokens . has ( "=" ) ) { tokens . next ( ) ; return Operator . Kind . LESS_EQUAL ; } return Operator . Kind . LESS ; } if ( tokens . has ( ">" ) ) { tokens . next ( ) ; if ( tokens . has ( "=" ) ) { tokens . next ( ) ; return Operator . Kind . GREATER_EQUAL ; } return Operator . Kind . GREATER ; } return null ; }
check for and get an operator kind .
